Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 4 of 4

Thread: GL_MODULATE?

  1. #1
    Intern Contributor
    Join Date
    May 2001
    Location
    Austria
    Posts
    65

    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

  2. #2
    Member Regular Contributor
    Join Date
    Jul 2000
    Location
    Arlon, Belgium
    Posts
    486

    Re: GL_MODULATE?

    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 ...

  3. #3
    Senior Member OpenGL Guru
    Join Date
    Mar 2001
    Posts
    3,768

    Re: GL_MODULATE?

    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.

  4. #4
    Intern Contributor
    Join Date
    May 2001
    Location
    Austria
    Posts
    65

    Re: GL_MODULATE?

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •