forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

sceGumRotate in 2D

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
fish



Joined: 08 Feb 2006
Posts: 25

PostPosted: Thu Mar 02, 2006 9:32 pm    Post subject: sceGumRotate in 2D Reply with quote

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
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group