2D bitmap/texture hardware rotation?
2D bitmap/texture hardware rotation?
Hey I have the GU set up for 2d sprites (will provide GU setup/rendering code if it’s needed) but can’t figure out how to have it rotate them. I did write a software implementation but it’s turning out to be far too slow, so is there anyway to have the GU do this? Can anyone point me in the right direction? Thanks.
Another alternative is to use the oldschool library available here
Its powerfull and easy to use. Can deform, scale, rotate with or without bilinear filtering.
Its powerfull and easy to use. Can deform, scale, rotate with or without bilinear filtering.
"the sony PSP was built by god, to determine who on earth had the best skills to defeat the armies of satan" - Saint Peter.
Could you provide an example? I had a look through the SDK samples and they seam to use something similar to this but it dose absolutely nothing in my app (the samples all use GU_TRANSFORM_3D instead of GU_TRANSFORM_2D as well)Raphael wrote:Setup the MODEL VIEW matrix for rotating your vertices. If you don't know how to do this, use gum's sceGumRotateX/Y/Z functions
Code: Select all
sceGumMatrixMode(GU_MODEL);
sceGumRotateZ(1.5);
No thanks, the actual lib doesn’t seam to be open source and I like to know exactly whets happening in my app :PCogboy wrote:Another alternative is to use the oldschool library available here
Its powerfull and easy to use. Can deform, scale, rotate with or without bilinear filtering.
That's why it won't work. You need GU_TRANSFORM_3D so that the Modelview matrix is actually applied. You'd also have to use a orthogonal projection then if you want to stay in 2D (look in gum for the appropriate function to setup ortho view. I think there also was a thread anywhere here about it).ddgFFco wrote: Could you provide an example? I had a look through the SDK samples and they seam to use something similar to this but it dose absolutely nothing in my app (the samples all use GU_TRANSFORM_3D instead of GU_TRANSFORM_2D as well)