I'm trying to rotate a sprite/poly, in 2d (ie. most of the setup is the same as in the graphics.c in the scriptscribbler tutorials)
I figured it would be a simple case of:
Code: Select all
sceGumMatrixMode(GU_MODEL);
sceGumPushMatrix();
sceGumRotateZ(3.14159 * 0.25f); //45°
vertices = (Vertex*) sceGuGetMemory(4 * sizeof(Vertex));
//fill vertices
sceGuDrawArray(GU_TRIANGLE_FAN, Vertexinfo, 4, 0, vertices);
sceGumPopMatrix();
I could of course manually calculate the roated vertices using sin/cos, but that's a waste of time when there's hardware that can/should do that a bajillion times faster anyway.
am I missing something really obvious? Is there maybe a toggle to tell the PSP that I want to use transformations? or is it something deeper?
thanks for any help