I’ve encountered a problem whilst learning how to texture in OpenGL (from OpenGL 5th Edition Bible). The problem is that I can’t display my texture. I load it from a BMP file with a function I’ve written myself.
Since code is quite lengthy I uploaded all neccessery files. You can download it from here.
EDIT: I’ve tried copying code from the mentioned book (TGA loading described there) and it doesn’t work as well. It seems that loading stucks at loading image data from file (strange). I suppose it isn’t relevant as far as my problem is concern.
There are general debug steps for checking for problems. I will list them below in the hope you might find the bug (and for future readers):
glBindTexture(..)in the constructor (of some class). The objects were created before OpenGL was initialised.GL_TEXTURE_2D? Check the initialise code, use:glEnable(GL_TEXTURE_2D)glColor3f(0,0,0)?There could be more checks, but these are the ones hitting my head now