Original Post
Hi,
Im having a strange problem. In a simple program, when I call glBindTexture while getting the texture id in a global variable, if I do not call glEnable(GL_TEXTURE_2D) then, and instead I call it while actually rendering the model (e.g.) in a function like renderModel(), just before glVertex3f() and glTexCoord2f(), nothing happens. Means that the call glEnable(GL_TEXTURE_2D) isnt having any effect whatsoever when called in this particular function, even though its a global function just as the initialization function where the texture is actually created (as mentioned above).
I have absolutely no idea why this is happening. Similarly, when in each frame, I render the whole world (and thus bind many textures) and when in the next frame, I render the model and try to bind its own texture id in OpenGL, it somehow doesnt have any effect and it renders the model with the last texture bound (the one it bound while rendering the world).
I would really appreciate if someone could help me.
Thanks,
On a long enough time line, the survival rate drops to zero.