PDA

View Full Version : register cobiner questions



zed
03-26-2002, 12:20 AM
im not to sure what the following means in the registercombiners.pdf document

Some OpenGL multitexture TexEnv modes only use 1 general combiner:
No Alpha component in Texture1 AND
TexEnv for second texture unit (Texture1) is GL_ MODULATE OR
TexEnv for Texture1 is GL_ ADD and color sum not used

this sounds like its related to
----------------------
also "Light Mapped Multitexture with Fog
Coded using glTexEnv with GL_ MODULATE and GL_ MODULATE"
aye?
sure going
glActiveTextureARB(GL_TEXTURE0_ARB);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glActiveTextureARB(GL_TEXTURE1_ARB);
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
makes no difference
ie modulate/add etc are all done in the register combiners, or do i misunderstand

----------------------
also concerning optimal performance
say im not using C or C+D etc what state should i set them to (does it matter i assume not but u never know)
eg
glCombinerInputNV(GL_COMBINER1_NV, GL_RGB, GL_VARIABLE_C_NV, GL_SPARE1_NV, GL_UNSIGNED_IDENTITY_NV, GL_RGB);
glCombinerInputNV(GL_COMBINER1_NV, GL_RGB, GL_VARIABLE_D_NV, GL_CONSTANT_COLOR1_NV, GL_SIGNED_IDENTITY_NV, GL_RGB);
glCombinerOutputNV(GL_COMBINER1_NV, GL_RGB, GL_SPARE1_NV, GL_DISCARD_NV, GL_DISCARD_NV, GL_NONE, GL_NONE, GL_FALSE, GL_FALSE, GL_FALSE);

so for C*D GL_DISCARD_NV ignores the result but is it better to set either GL_SPARE1_NV, GL_UNSIGNED_IDENTITY_NV to something else, i assume itll see the discard + then not do the c+d calculations but one never knows.