Disabling glActiveTextureARB

Started by
4 comments, last by duhroach 21 years, 7 months ago
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
==Colt "MainRoach" McAnlisGraphics Engineer - http://mainroach.blogspot.com
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.
------------------------------BASIC programmers don't die, they just GOSUB and don't return.
Select the textures you want turned off (with glActiveTextureARB) and call glDisable with GL_TEXTURE_2D.

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
==Colt "MainRoach" McAnlisGraphics Engineer - http://mainroach.blogspot.com
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.
If at first you don't succeed, redefine success.
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
==Colt "MainRoach" McAnlisGraphics Engineer - http://mainroach.blogspot.com

This topic is closed to new replies.

Advertisement