glTexImage2D( | |
---|---|
GL_TEXTURE_2D, | // This argument is required |
0, | // level |
3, | // number of components (RGB here) |
width, | // width of texture map |
height, | // height of texture map |
0, | // no border |
GL_RGB, | // format of texture map |
GL_UNSIGNED_BYTE, | // number type |
teximage); | // pointer to actual map |
void display( void )
{ glBegin( GL_QUADS ); |
---|
glTexCoord2i(0, 0); glVertex3i(0, 0, 0);
glTexCoord2i(0, 1); glVertex3i(0, 10, 0); glTexCoord2i(1, 1); glVertex3i(100, 10, 0); glTexCoord2i(1, 0); glVertex3i(100, 10, 0); |
glEnd( );
glFlush( ); } |