Jump to content
  • Advertisement
Sign in to follow this  
Emil_Halim

glTexEnvi question

This topic is 4856 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

Hi all how to reset the next lines to it's default values? glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_EXT); glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB_EXT, GL_REPLACE); thanks for any help

Share this post


Link to post
Share on other sites
Advertisement
GL_MODULATE is the default, but why do you want to restore the state? Just make sure you set all necessary states when changing the combiners setup, and it won't matter what the state was before.

Share this post


Link to post
Share on other sites

well,i will be more specific.

when changing the renerstate by those function then render some stuff ,every thing is ok,after that i want to render another stuff with another renderstate
but when do this it does not work as expcted,so that i want to reset to it's default values.

so you have said,GL_MODULATE is the default, is it for GL_TEXTURE_ENV_MODE
or for GL_COMBINE_RGB_EXT?

thanks for your help

Share this post


Link to post
Share on other sites
Quote:
Original post by Emil_Halim

well,i will be more specific.

when changing the renerstate by those function then render some stuff ,every thing is ok,after that i want to render another stuff with another renderstate
but when do this it does not work as expcted,so that i want to reset to it's default values.

But that is exactly what I'm talking about in my first post, that you don't have to care about other states when you make sure you set everything you need. If you get strange results for the second set of stuffs, then you're obviously not setting every state you need to set. Restoring the default state every time just means you're assuming a certain state at a certain point in your program, which is not something i recommend. Instead take a look at how you set up the states for the second set to see what's missing.

But if you really want to restore every single state, do what anist suiggested.

Quote:
Original post by Emil_Halim
so you have said,GL_MODULATE is the default, is it for GL_TEXTURE_ENV_MODE
or for GL_COMBINE_RGB_EXT?

thanks for your help

It's for GL_TEXTURE_ENV_MODE.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!