PDA

View Full Version : sceGuStart Question


dega512
10-23-2006, 04:15 PM
This is probably a very n00bish question but I can't figure it out. I am just starting out with the graphics API that comes with the PSP SDK and I am struggling with understanding what a few of the functions do (there is only so much the comments in the header files can tell you), in this case it's sceGuStart. Let me show the code before I ask my questions:


// headers

#define ALIGNED __attribute__((aligned(16)))

static unsigned int ALIGNED list[262144];
static bool running = true;

// all of my other global variables, callbacks, etc...

int main(int argc, char *argv[])
{
// variables, init code etc...

while (running)
{
sceGuStart(GU_DIRECT, list); // CONFUSING, ARRRGGGG

// actually do the rendering here
}

// all of my de-init code

return 0;
}

Ok, so my questions are:

What is sceGuStart for?
Why GU_DIRECT?
Why does sceGuStart need 'list' (and why is list the size it is)?


Am I making this way too complicated or is this similar to OpenGL display lists?

Thanks a ton :lol: !
- dega

dave_
10-24-2006, 01:12 AM
PSP SDK? If you've got it legally use your support forums/newsgroups. You should realise the license agreement prohibits you from talking about it.
If you haven't got it legally, you probably shouldnt be posting here.

dega512
10-24-2006, 09:45 AM
I did not acquire the SDK illegally, and why should I not post my question here? This is the graphics API forum is it not?

Reedbeta
10-24-2006, 10:18 AM
The PSP SDK is under NDA, so you probably shouldn't post anything to do with it here, since there are people here who haven't signed that NDA (most of us).

dega512
10-24-2006, 10:20 AM
I'm using the open source sdk not Sony's.

Update on my question: I understand that sceGuStart is for display lists and why I need to use GU_DIRECT, but I am still confused why the display list is 262144 elements long...

dave_
10-24-2006, 11:35 AM
Its probably a fairly arbitary number. 264144 == 256 *1024 and sizeof(int) = 4
So that means thats 1Mb of memory aligned on 4 byte boundary

bladder
10-24-2006, 04:00 PM
wow... I had no idea! (http://ps2dev.org/)

dega512
10-24-2006, 05:07 PM
Its probably a fairly arbitary number. 264144 == 256 *1024 and sizeof(int) = 4
So that means thats 1Mb of memory aligned on 4 byte boundary

Oh that makes sense, it's just a buffer that gets filled in with all of your drawing calls. Thanks for the deciphering of the number dave_ :lol: !

wow... I had no idea!
About what?

bladder
10-24-2006, 05:20 PM
About what?
The link dude the link... ps2dev, i had no idea there was an open source psp dev kit and a tool chain ... :glare:

dega512
10-24-2006, 05:24 PM
Oh lol, I just thought you meant the ps2dev site in general.

dave_
10-25-2006, 02:26 AM
Sony have been known to send out emails reminding everyone of their NDAs. They seem to think that has been made by copying (or at least with knowledge of) the closed source libs.