I am currently using the following (I won't reproduce the "NeHeLoadBitmap" function) code:
In the opening declarations:
GLuint texture[2];
In the OpenGL init function:
if (!NeHeLoadBitmap("Data/img1.bmp", texture[0])){ return false;}if (!NeHeLoadBitmap("Data/img2.bmp", texture[1])){ return false;}
Then in the display code, I am calling...
glBindTexture(GL_TEXTURE_2D, texture);
...whenever I want a certain texture to be applied to the subsequent triangles I draw, Where "i" is the ID of the texture created.
However it is always the most recent texture to be loaded (via the NeHeLoadBitmap function) that is applied to every triangle I draw, regardless of what I do with the later glBindTexture calls. I am obviously missing something obvious and doing something wrong, I was wondering if anyone who has experience with the GLaux replacement code could point me in the right direction.
Any assistance will be much appreciated, thanks.