Jump to content
  • Advertisement
Sign in to follow this  
cubicwang

OpenGL newbie question about the opengl texture functions.

This topic is 4432 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I see most of the gl sample do with the texture function after the glBindTexture like this: glBindTexture(p) glTexEnv() glTexParamter() Is the two function glTexEnv and glTexParamter only take effect with the binded texture or like direct3d will take effect to all the texture set to this unit? I use the ARB mutlitexture method. I use glActiveTexture(GL_TEXTURE1_ARB) And then I call glBindTexture(p) glTexEnv() glTexParamter() Will the two function glTexEnv and glTexParamter take effect to the binded texture or every texture set to unit 1? Thank you very much!!!!!

Share this post


Link to post
Share on other sites
Advertisement
Texture parameters are stored on a per-texture object basis. The texture environment is stored on a per-texture unit basis. So calls to glTexParameter will *only* affect the currently bound texture object. Calls to glTexEnv affect the active texture unit, so any textures that get bound to that unit will be drawn using that environment, but the environment isn't stored as part of the texture object's state.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!