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.
gettings started: some questions
Re: gettings started: some questions
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.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?
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).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?
Re: gettings started: some questions
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.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 2048x2048 offset that jsgf explained seems to be there to make 2D clipping easier for the chip.
Paco