I am able to set up textures, but sometimes I do have problems with it. I want to load a few textures into the memory. I am doing this using:
glGenTextures( 1, &texture );
glBindTexture( GL_TEXTURE_2D, texture );
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, 256, 256, 0, GL_RGB, GL_UNSIGNED_BYTE, data);
So texture should be a uniwue identifier for each texture. But if I am trying to load different (and also textures which are already in the memory) textures. The texture id keeps the same. So that from time to time a wrong texture is mapped on a surface.
I think it could be, because OpenGL recognizes, that the texture is already loaded.
Someone has an idea?