Results 1 to 2 of 2

Thread: help with 3d sample in c++

                  
   
  1. #1

    Default help with 3d sample in c++

    regarding the examples in the sdk\samples\gu directory, i dont get where logo_start was assigned its value... they just declared:

    extern unsigned char logo_start[];

    and then all of a sudden they used it:

    sceGuTexImage(0,64,64,64,logo_start);

    the example runs well on my psp: its a cube rotating with a logo in each face. but i dont understand how it the variable logo_start obtained its value.

    thanks in advance

  2. #2
    GP2X Coder/Moderator
    Join Date
    Jan 2006
    Posts
    1,678
    Rep Power
    87

    Default

    extern unsigned char logo_start[];

    The extern keyword is to tell the compiler that the variable is instantiated in another source file when the header file is included. It pretty much acts like the prototype of a function. The value in logo_start is probably in another source (.c/.cpp) file.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •