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 2 of 2

Thread: GL_TEXTURE_ENV_COLOR/Multitexturing with TNT2

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2002
    Location
    Berlin, Germany
    Posts
    7

    GL_TEXTURE_ENV_COLOR/Multitexturing with TNT2

    Currently I'm doing quality ensurance for my OpenGL game and stepped into a bug / not supported feature of a NVidia Riva TNT2 graphics card:

    I'm rendering an object with two texel units and have to set the GL_TEXTURE_ENV_COLOR to different values for each of the two textures that are rendered (in one pass).

    Here's a code sample:

    ------------------------
    // TU 1
    glActiveTextureARB( GL_TEXTURE0_ARB );
    glEnable( GL_TEXTURE_2D );
    glBindTexture( GL_TEXTURE_2D, t1 );
    glTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_BLEND );
    glTexEnvfv( GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, color1 );

    // TU 2
    glActiveTextureARB( GL_TEXTURE1_ARB );
    glEnable( GL_TEXTURE_2D );
    glBindTexture( GL_TEXTURE_2D, t2 );
    glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_BLEND );
    glTexEnvfv( GL_TEXTURE_ENV, GL_TEXTURE_ENV_COLOR, color2 );

    // render....
    -----------------------

    The two textures both receive the color that I set for texture two, color one is not used. Is this an unsupported feature of the graphics card or a driver bug? Should I care about this? Maybe someone has another idea how to render it without rendering everything two times?

    Lyve

  2. #2
    Member Regular Contributor
    Join Date
    Mar 2001
    Posts
    469

    Re: GL_TEXTURE_ENV_COLOR/Multitexturing with TNT2

    Hi

    its a missing feature of the TNT2. They only have one texture environment color.
    I had the same problem some time ago and one of the NVIDIA guys(I believe it was Matt) told me the background.

    Perhaps you can use the GL_EXT_texture_env_combine extension for a more flexible way to stup shadinmg. Its available for TNT2. Perhaps you could use the primary color as a operand

    Bye
    ScottManDeath

Posting Permissions

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