Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

duhroach

Disabling glActiveTextureARB

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

Once you''ve given the call glActiveTextureARB() how do you turn it off? I have 2 models i want multi textured, and the rest i want single textured. but for some reason, it effects all of them. any ideas? ~Main == Colt "MainRoach" McAnlis Programmer www.badheat.com/sinewave

Share this post


Link to post
Share on other sites
Advertisement
I don''t know about openGL, but in D3D, it would be something like this: pDevice->SetTexture(1, NULL). Perhaps this gives you some ideas as to how it might be done in GL? Hope this helps!

------------------------------
BASIC programmers don''t die, they just GOSUB and don''t return.

Share this post


Link to post
Share on other sites
That doesn''t seem to work.

seems any time i do the glActiveTextureARB(GL_TEXTURE1_ARB) (that is, notice i''m useing texture1) i get the rendering error. I have no clue as to why texture1 gives the error and texture 0 doesn''t. Even after doing a glDisable(GL_TEXTURE_2D) it still doesn''t have an effect

~Main

==
Colt "MainRoach" McAnlis
Programmer
www.badheat.com/sinewave

Share this post


Link to post
Share on other sites
Post code.

You should do something like so ( if you have two texture units, and only want to use one ):


glActiveTexture( GL_TEXTURE1 );
glDisable( GL_TEXTURE_2D );
glActiveTexture( GL_TEXTURE0 );

// set and render texture...


Death of one is a tragedy, death of a million is just a statistic.

Share this post


Link to post
Share on other sites
Well i''ll be a sonofabitch.

I was doing disabling texutre0 before texture1
i fliped it, and now it works fine.

that''s wierd.
thanks for the help!!
~Main

==
Colt "MainRoach" McAnlis
Programmer
www.badheat.com/sinewave

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!