Disabling glActiveTextureARB
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
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
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
Post code.
You should do something like so ( if you have two texture units, and only want to use one ):
Death of one is a tragedy, death of a million is just a statistic.
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement