GL_ADD with glTexEnv() and texturing

Is it right to use GL_ADD with the glTexEnv(gl_texture_env_mode, ) to get additive blending when texuring?
If so then why is this not mentioned in the Redbook?
Only GL_REPLACE, GL_MODULATE, GL_DECAL and GL_BLEND are mentioned as params to glTexEnv().

Is there any differance between GL_MULT and GL_MODULATE when using glTexEnv()?


GL_ADD is an extension, so you have to first test for whether it will work by checking the extension string.

Check for EXT_texture_env_add or ARB_texture_env_add. I would choose the ARB version if available, as it’s formally defined to saturate to 1, while the EXT version is not.

ive never heard of GL_MULT, multiply perhaps!
GL_MODULATE multiples the current texture with the previous fragment colour ie A*B, GL_ADD does A+B

Nutty uses GL_MULT in the space ship prog at his page
(he also uses GL_ADD)

how exactly does multiply work? as in do the textures have to both be only values from 0-15 (so that you don’t go over 255 when multiplied)? I assume there must be a different way it works, but how?

It interprets 255 as 1.0 when doing GL_MODULATE.


Ooops! I guess I should be checking for that extension then?? I didn’t think it was an extension.

I dont know the difference between modulate and mult either, I think they do the same thing.

My new Geforce 3 does not have ARB_texture_env_add, only EXT_texture_end_add. Thats with 12 series drivers.


Look more carefully, we do support ARB_texture_env_add on everything since TNT.

  • Matt

Ooops! You’re right!! I need glasses!