PDA

View Full Version : Disabling Multitexturing



Bruno
11-23-2000, 01:03 AM
Hi
I'm rendering a scene using multitexturing extensions, is there a way to disable the multitexturing, to do something like this:

Enable Multitexturing
Draw Scene
Disable Multitexturing
Draw Other Scene

thanks

Bruno

paolom
11-23-2000, 02:27 AM
Originally posted by Bruno:
Hi
Enable Multitexturing
Draw Scene
Disable Multitexturing
Draw Other Scene


Very simple answer. (really I think this would be more appropriate in Beginner's Forum)
Remember to enable/disable GL_TEXTURE_2D (or whatever) for every active texture unit.

Here I go with an example with 2 units:

1] Enable multitex for units;
glActiveTextureARB(GL_TEXTURE0_ARB);
glBindTexture(GL_TEXTURE_2D, tex0);
glEnable(GL_TEXTURE_2D);
glActiveTextureARB(GL_TEXTURE1_ARB);
glBindTexture(GL_TEXTURE_2D, tex1);
glEnable(GL_TEXTURE_2D);

2] render geometry

3] disable units
glActiveTextureARB(GL_TEXTURE0_ARB);
glDisable(GL_TEXTURE_2D);
glActiveTextureARB(GL_TEXTURE1_ARB);
glDisable(GL_TEXTURE_2D);

4] render non-textured geometry

--Paolo

[This message has been edited by paolom (edited 11-23-2000).]

Bruno
11-23-2000, 03:44 AM
hmmm, i guess it's much easier than i tought!

thanks
Bruno