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 

Why sceGuFrontFace(GU_CW)?

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



Joined: 17 Oct 2008
Posts: 43

PostPosted: Fri Oct 02, 2009 12:19 am    Post subject: Why sceGuFrontFace(GU_CW)? Reply with quote

Hi, everybody.

Why much code for psp use clockwise instead of counter-clockwise like an OpenGL by default :-)?

Thanks.
Back to top
View user's profile Send private message
jojojoris



Joined: 30 Mar 2008
Posts: 261

PostPosted: Fri Oct 02, 2009 6:12 am    Post subject: Reply with quote

Probably cause the coder wants to.

That's realy the only answer. Iy you want to use GU_CCW you can use GU_CCW.
_________________
Code:
int main(){
     SetupCallbacks();
     makeNiceGame();
     sceKernelExitGame();
}
Back to top
View user's profile Send private message
dridri



Joined: 31 Jul 2009
Posts: 35

PostPosted: Fri Oct 02, 2009 6:35 am    Post subject: Reply with quote

This is the source code :
Code:
void sceGuFrontFace(int order)
{
   if (order)
      sendCommandi(155,0);
   else
      sendCommandi(155,1);
}

Yes its a special way, because if you write GU_CW the GU_CCW mode is used, and if you write GU_CCW the GU_CW mode is used...

I think it's due to the PSPGU's programmer reversed a game to know how the PSPGE is used and next write the PSPGU, maybe this game was in CW mode...
_________________
I'm French, and 15 years old, so my English is not good...
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Fri Oct 02, 2009 7:32 am    Post subject: Reply with quote

Say you wanted to render an object on a reflective floor.

You would draw object A with CCW, then negate the Y axis in your model view, then draw object A with CW.

Jim
_________________
http://www.dbfinteractive.com
Back to top
View user's profile Send private message Visit poster's website
lego



Joined: 17 Oct 2008
Posts: 43

PostPosted: Fri Oct 02, 2009 7:31 pm    Post subject: Reply with quote

Thanks for replies.
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