silly noob question...

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.

Thanks for you help!

It does work that way, however it comes with a 50% performance hit. I’d like to use texture objects as much as possible…

I guess I’ll just try redefining the texture object over and over again…

[This message has been edited by Plato (edited 11-21-2002).]

Try a call of

glBindTexture(GL_TEXTURE_2D, 0);

Or perhaps there is a glUnbind() in GL1.1+? Don’t have my Red book with me - Only have MS doco’s to look at.