PDA

View Full Version : help with 3d sample in c++



roberto_h25
July 19th, 2006, 04:28
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

yaustar
July 19th, 2006, 17:50
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.