| View previous topic :: View next topic |
| Author |
Message |
ne0h
Joined: 21 Feb 2008 Posts: 386
|
Posted: Mon Feb 09, 2009 5:09 am Post subject: A way to rotate images using sceGu? |
|
|
There's a way to rotate a texture with sceGu? ( 2D, is a simple image ) _________________ Get Xplora! |
|
| Back to top |
|
 |
jean

Joined: 05 Jan 2008 Posts: 489
|
Posted: Mon Feb 09, 2009 6:34 am Post subject: |
|
|
| Of course, there is one! |
|
| Back to top |
|
 |
jean

Joined: 05 Jan 2008 Posts: 489
|
Posted: Mon Feb 09, 2009 6:37 am Post subject: |
|
|
No, seriouly: do you need to rotate a texture only to show it rotated on the screen or you need to have the buffer with a rotated image back (e.g. to save it back on disk)??
The former is pretty straightforward:one simple way to do it implies writing a couple of polygons after having setted a rotation transform matrix, and you can desume ti from GU examples in pspsdk faster than i could explain. The latter is a huge pain in the a** because it requires some offscreen rendering using framebuffer objects. And it's not sure the speed advantage would worth the pain. I'm pretty sure i already discussed the topic somewhere on this forum, where i ended up pointing to wikipedia's rotation basics (http://en.wikipedia.org/wiki/Rotation_matrix) |
|
| Back to top |
|
 |
Torch

Joined: 28 May 2008 Posts: 842
|
Posted: Mon Feb 09, 2009 1:18 pm Post subject: |
|
|
| If you want 90 degree rotation, you'll get pixel perfect rotation only though software rotation coded for 90 degrees. For arbitrary angles its better to use GU with rotation matrix since the difference between that and software arbitrary would most probably be subjective. |
|
| Back to top |
|
 |
|