glActiveTexture(GL_TEXTURE0);
glBindTexture(GL_TEXTURE_CUBE_MAP, NormCubeMap);
glEnable(GL_TEXTURE_CUBE_MAP);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_DOT3_RGB);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0, GL_TEXTURE0);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1, GL_TEXTURE1);
glActiveTexture(GL_TEXTURE1);
glBindTexture(GL_TEXTURE_2D, Bump);
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_MODULATE);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0, GL_PREVIOUS);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1, GL_PREVIOUS);
glActiveTexture(GL_TEXTURE2);
glBindTexture(GL_TEXTURE_2D, nomap);
glEnable(GL_TEXTURE_2D);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_MODULATE);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0, GL_PREVIOUS);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1, GL_PREVIOUS);
Here I use Texture Unit 2 only for taking the square of Texture Unit 1. But if I disable textureing the Texture Environment won''t work. But how can I use this Texture Unit only for Texture Env. I don''t pay the cost of sampling a texture here...
Thanks for any help!
--------------------------------------------------------
"If it looks good, it is good computer graphics"
"If it looks like computer graphics, it is bad computer graphics"
Corrail
corrail@gmx.at
ICQ#59184081
Using TexUnv without Textures
Hello!
I''ve got the following problem:
I want to use the TexEnv of a Texture Unit without a texture but I''m afraid of performance loss:
--------------------------------------------------------There is a theory which states that if ever anybody discovers exactly what the Universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.There is another theory which states that this has already happened...
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement