On May 8, 2006, at 3:03 PM, Alexandre Quessy wrote:
The default blending mode between geos is "add". I would like to set it to "multiply" in some cases and "mask", so that when we are viewing a geo with a pix texture on it, we don't see the other geos' pix textures behind it ? I am sure this is possible. How ?
...actually the default mode is "modulate", where it the texture is
modulated by the surface color of the geo...the I recently added
support for this (ie. glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE,
m_env) )in gem cvs (and the pix_texture.pd help patch covers it):
basically you just send an [env $1< to [pix_texture], with the
following supported values:
0=GL_REPLACE 1=GL_DECAL 2=GL_BLEND 3=GL_ADD 4=GL_COMBINE
4=GL_MODULATE (default)
...alternatively, if yr just looking to play with blending, you could
use [GEMglBlendFunc] and [GEMglBlendEquation]...looks like we need to
add wrappers for glBlendFuncSeparate(), glBlendColor(), and
glBlendEquationSeparate() (putting it on the to-do.91)...
jamie