I posted this in the Beginners area, but I’m not certain anyone in there will help me - I’m doing something basic, but mixing texture object calls and glTexImage2d() calls because I want a dynamic texture.
I end up with everything being textured with the dynamic texture - even the object I’m texturing with a texture object. I can’t figure out why it’s happening…
I presume you intend to have (essentially) two textures.
One is the texture for the walls and the other is the dynamic texture.
The textures on the walls are stored in the Texture object whos id is stored in “integer_for_texture_object”.
The problem is that you bind this texture, and then blast it with your call to glTexImage2d(). You don’t have a separate texture object for your dynamic texture.
So really you need “integer_for_texture_object” and “integer_for_dynamic_texture_object”. And you need to bind the appropriate object as you go.
BTW - Not sure if this is still correct but it used to be quicker to use glTexSubImage2D.