A way to rotate images using sceGu?

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
ne0h
Posts: 386
Joined: Thu Feb 21, 2008 2:15 am

A way to rotate images using sceGu?

Post by ne0h »

There's a way to rotate a texture with sceGu? ( 2D, is a simple image )
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

Of course, there is one!
User avatar
jean
Posts: 489
Joined: Sat Jan 05, 2008 2:44 am

Post by jean »

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)
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

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.
Post Reply