About GlColorxx();

Hello !

Using a GlColor3f(); to set the color of a vertex allow to multiply the texture color by the argument given in GlColor3f();

Is there any way to specify the operation ? ( substract / add ) ?

Thank you.

No, I don’t think you can do it directly.

But you can apply a texture to it and then texture when applied can be combined with the base color in a various operations, like add/sub with the glBlendFunc.

also could use two vertex and the blend function would also allow you to mix the two.

glBlendFunc
glColorxx(Color1)
vertex1
glColerxx(Color2)
vertex2

There maybe also another way, but this is the first thing that came to mind.

Originally posted by FlemTeam:
[b]Hello !

Using a GlColor3f(); to set the color of a vertex allow to multiply the texture color by the argument given in GlColor3f();

Is there any way to specify the operation ? ( substract / add ) ?

Thank you.[/b]

[This message has been edited by nexusone (edited 11-04-2002).]

As previous post, check out glBlendFunc but also glBlendEquationEXT and glBlendColorEXT.

They might have the features you’re looking for.

The last two requires some gl extensions though.

You might also look at
GL_ARB_texture_env_combine with CONSTANT_ARB
and modulation.

Extension registry: http://oss.sgi.com/projects/ogl-sample/registry/

Opengl API: http://wwws.sun.com/software/graphics/OpenGL/manpages/man3glindex.html

I think you are erfering to the texture environment… there you have Modulate (default), Decal, Blend and dome other mode… and then you have extensions that adds more operations, as ADD, ADD_SIGNED and so on…

Look at glTexEnv