Re: Ignoring texture alpha

[email protected]
Newsgroups gmane.games.devel.opengl
Organization Fat City Network Services, San Diego, California
Message-ID <[email protected]>
 
If your graphics card supports the GL_ARB_texture_env_combine  extension or 
OpenGL 1.3, then you can specify separate texture functions for RGB  and Alpha. 
 Here's an example using...
 
 
// Set the texture environment mode to  ARB_texture_env_combine.
glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE,  GL_COMBINE);
 
// Set the texture environment combiner properties for the
// RGB color  channels.
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB,  GL_MODULATE);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB,  GL_PRIMARY_COLOR);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE1_RGB,  GL_TEXTURE);

// Set the texture environment combiner properties for the
// alpha  channel.
glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_ALPHA,  GL_REPLACE);
glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_ALPHA,  GL_PRIMARY_COLOR);


Hope this helps,
Damin.
 
 
In a message dated 3/10/2005 3:49:30 AM Central Standard Time,  
[email protected] writes:

Hi,
I have a texture which is of the format GL_RGBA  and there is
information in the alpha channel. The problem is that I want  to ignore
the alpha channel when drawing, but still use vertex  colour/alpha. I
can't seem to find any way to do this via the texture  functions. At the
moment I'm using GL_MODULATE but I get C=CfCt and A=AfAt,  but I want
C=CfCt and A=Af. I can't change the texture to GL_RGB as I  actually
render it using the alpha channel in other places.

Any  ideas?

cheers,
Bill.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.