22 Nov 2002
Costruzione di Interfacce - Paolo Cignoni
11
Loading an image
v
vSi passa ad opengl il blocco di mem che rappresenta la texture. Opengl lo copia nella memoria della scheda e lo formatta come meglio crede. Operazione piuttosto lenta.
v
vvoid glTexImage2D(GL_TEXTURE_2D
v  GLint level,         // the mipmap level
v  GLint components,    // number of color component (1..4)
v  GLsizei width,       // must be 2^n
v  GLsizei height,      // must be 2^n
v  GLint border,        // width of border
v  GLenum format,       // GL_RGB, GL_RGBA, GL_ALPHA ecc
v  GLenum type,         // data type of pixel (GL_BYTE, ecc)
v  const GLvoid *pixels // a pointer to the image.
v);
v