Original Post
I'm trying to use glTexEnv along with ARB_multitexture to make lightmaps but I need some help with blending. I've tried out all four modes using glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, ... ): GL_MODULATE, GL_BLEND, GL_REPLACE, and GL_DECAL and all but GL_BLEND seem to have no visible effect different from the default multitexture blending. GL_BLEND just seems to invert the colors of the lightmap. What happens right now (it seems) is that the lightmap texture's black areas make the object completely black and the lightmap's white areas make the object's original texture show through 100% (like normal). What I want is for the black areas on the lightmap to make the object completely black in that spot and the white areas to make the object white... Basically, rather than have the lightmap as a "mask" for the texture, have it affect the brightness of the object (and tint the color too). What settings for glTexEnvf should I use, or some other function? Also, what's the difference between glTexEnvf and glTexEnvi?