GL_MODULATE?

Hi

I am doing my own particle-engine. i got a texture loaded, and leave the texenv to “GL_MODULATE”.
when i render my particles, i turn lighting, and dept-test off, and turn blend on.
i am not quite finished with the engine, but it seems to me that the modulating doesn’t show any effect at all.

cheers,
martin

Hi,

Does GL_MODULATE is for multi-texture ?

I use this function for doing multi-texture.

Here’s my code and GL_MODULATE works :

glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
glBindTexture(GL_TEXTURE_2D, Texture[1]);
glEnable(GL_TEXTURE_2D);
glBegin …
etc …

GL_MODULATE as a Texture Environment mode means that it will take the texture color and multiply it by the incoming color. Lighting has an effect on the incoming color, but it isn’t the only thing. If lighting is off, the incoming color is affected only by the current state of glColor. If you haven’t set it, then the initial color is probably white, which is why you don’t see a change.

ups, i am very sorry. i found out yesterday evening.

like glTexparam i thought thera different environments for 2d and 1d, and since opengl is quite nice, it didn’t crash either.

all, my fault.
thanks for the help.
martin