Jump to content


sceGuStart Question


10 replies to this topic

#1 dega512

    Valued Member

  • Members
  • PipPipPip
  • 108 posts

Posted 23 October 2006 - 11: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

#2 dave_

    Senior Member

  • Members
  • PipPipPipPip
  • 584 posts

Posted 24 October 2006 - 08: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.

#3 dega512

    Valued Member

  • Members
  • PipPipPip
  • 108 posts

Posted 24 October 2006 - 04:45 PM

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?

#4 Reedbeta

    DevMaster Staff

  • Administrators
  • 4979 posts
  • LocationBellevue, WA

Posted 24 October 2006 - 05:18 PM

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).
reedbeta.com - developer blog, OpenGL demos, and other projects

#5 dega512

    Valued Member

  • Members
  • PipPipPip
  • 108 posts

Posted 24 October 2006 - 05:20 PM

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...

#6 dave_

    Senior Member

  • Members
  • PipPipPipPip
  • 584 posts

Posted 24 October 2006 - 06:35 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

#7 bladder

    DevMaster Staff

  • Moderators
  • 1057 posts

Posted 24 October 2006 - 11:00 PM

wow... I had no idea!

#8 dega512

    Valued Member

  • Members
  • PipPipPip
  • 108 posts

Posted 25 October 2006 - 12:07 AM

Quote

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: !

Quote

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

#9 bladder

    DevMaster Staff

  • Moderators
  • 1057 posts

Posted 25 October 2006 - 12:20 AM

dega512 said:

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:

#10 dega512

    Valued Member

  • Members
  • PipPipPip
  • 108 posts

Posted 25 October 2006 - 12:24 AM

Oh lol, I just thought you meant the ps2dev site in general.

#11 dave_

    Senior Member

  • Members
  • PipPipPipPip
  • 584 posts

Posted 25 October 2006 - 09: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.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users