fish
Joined: 08 Feb 2006 Posts: 25
|
Posted: Thu Mar 02, 2006 9:32 pm Post subject: sceGumRotate in 2D |
|
|
Hey all.
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: |
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();
|
but this doesn't seem to do anything at all, the sprite/poly is still drawn unrotated, I've tried rotating X/Y/Z in case I was being stupid about which to rotate around, rotating before/after starting the GU.
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 |
|