Advertisement

GL_TEXTURE_ENV_COLOR with Multitexturing on TNT2

Started by November 10, 2002 01:54 PM
0 comments, last by Lyve 22 years, 3 months ago
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 (using Detonator 40.72)? Should I care about this? Maybe someone has another idea how to render it without rendering everything two times? Lyve
_____________________________________http://www.winmaze.de, a 3D shoot em up in OpenGL, nice graphics, multiplayer, chat rooms, a nice community, worth visiting! ;)http://www.spheretris.tk, an upcoming Tetrisphere clone for windows, a 3D tetris game on a sphere with powerful graphics for Geforce FX and similar graphics cards.
What is the format of those two textures? AFAIK GL_BLEND environment mode is supported only with luminance and alpha textures that is the textures with 1 or 2 color components per pixel.

This topic is closed to new replies.

Advertisement