View Full Version : 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()?
04-20-2001, 05:40 PM
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 www.nutty.org. (http://www.nutty.org.)
(he also uses GL_ADD)
04-21-2001, 06:40 AM
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.
04-21-2001, 09:15 AM
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.
04-21-2001, 12:03 PM
Look more carefully, we do support ARB_texture_env_add on everything since TNT.
04-21-2001, 12:21 PM
Ooops! You're right!! I need glasses! http://www.opengl.org/discussion_boards/ubb/rolleyes.gif
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.