 |
forums.ps2dev.org Homebrew PS2, PSP & PS3 Development Discussions
|
| View previous topic :: View next topic |
| Author |
Message |
Riviera Kid
Joined: 29 Oct 2005 Posts: 9
|
Posted: Sat Nov 05, 2005 8:45 am Post subject: gettings started: some questions |
|
|
A few questions about some functions and how stuff works
sceGuStart(GU_DIRECT,list);
this takes in an array of ints. What does the array contain? is it all of your commands which will then get executed when sceGuFinish() is called?
sceGuOffset(2048 - (SCR_WIDTH/2),2048 - (SCR_HEIGHT/2));
i dont see the point of this?
it seams 0,0 is way off the screen and at the bottom right. Is there anyway to put 0,0 at the top left, a matrix maybe?
thankyou. |
|
| Back to top |
|
 |
jsgf
Joined: 12 Jul 2005 Posts: 254
|
Posted: Sat Nov 05, 2005 9:17 am Post subject: Re: gettings started: some questions |
|
|
| Riviera Kid wrote: | sceGuStart(GU_DIRECT,list);
this takes in an array of ints. What does the array contain? is it all of your commands which will then get executed when sceGuFinish() is called? |
Right, you need to make sure list[] is big enough to hold all your commands; libgu doesn't do any command buffer management for you.
| Quote: | sceGuOffset(2048 - (SCR_WIDTH/2),2048 - (SCR_HEIGHT/2));
i dont see the point of this?
it seams 0,0 is way off the screen and at the bottom right. Is there anyway to put 0,0 at the top left, a matrix maybe? |
The rasterizer considers the center of the screen to be at 2048,2048, so this translates everything over there. You can use sceViewport to set the centre and width+height of your viewport. It also depends on whether you're bypassing the transform pipeline or not (setting GU_TRANSFORM_2D in your vertex formats). |
|
| Back to top |
|
 |
Paco
Joined: 09 Oct 2005 Posts: 54
|
Posted: Sat Nov 05, 2005 10:09 am Post subject: Re: gettings started: some questions |
|
|
| Riviera Kid wrote: | sceGuStart(GU_DIRECT,list);
this takes in an array of ints. What does the array contain? is it all of your commands which will then get executed when sceGuFinish() is called?
sceGuOffset(2048 - (SCR_WIDTH/2),2048 - (SCR_HEIGHT/2));
i dont see the point of this? |
The list will be used as a buffer where further sceGuXXX commands get stored. At the point where you call sceGuStart(), the list doesn't need to contain anything.
The 2048x2048 offset that jsgf explained seems to be there to make 2D clipping easier for the chip. _________________ Paco |
|
| Back to top |
|
 |
|
|
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
|