PDA

View Full Version : GL_BLEND vs gl_TexEnv(...gl_MODULATE)



Bra'Tac
05-03-2001, 12:44 AM
Is it possible to use gl_TexEnv(...gl_MODULATE) instead of using alpha blending, when I make a second pass for my spheremap ? Is it better in term of performance ?

Nutty
05-03-2001, 03:57 AM
I believe the answer is no. Something to do with glTexEnv only working from input from the primary/secondary color, and outputs of previous texture units. It does not modulate with the frame buffer.

You need to blend modes for that.

Nutty

Bra'Tac
05-04-2001, 04:29 AM
Thanks.

davepermen
05-06-2001, 12:24 PM
possibly you have multitexture_arb supported with 2 textures, then you can boost it up by doing just one pass..

glActiveTextureARB( GL_TEXTURE0_ARB );
glBind texture from first pass..
glActiveTextureARB( GL_TEXTURE1_ARB );
glBind second one and enable spheremapping here in
glTexEnv GL_MODULATE
glActiveTextureARB( GL_TEXTURE0_ARB );
just set back to the first stage..