How to load a bmp on GLUT to use it as a texture?
Look my simple c implementation function to load texture. GLuint LoadTexture( const char * filename ) { GLuint texture; int width, height; unsigned char * data; FILE * file; file = fopen( filename, “rb” ); if ( file == NULL ) return 0; width = 1024; height = 512; data = (unsigned char *)malloc( width … Read more