View Full Version : texture alpha value

04-11-2005, 11:54 AM
I searched the forum but didn't come up with anything appropriate so here goes:

I am drawing different textures(that may be of different formats, including RGBA with alpha values of their own) and would like to set a specific alpha value to each texture. The value varies from texture to texture.
how is this managable?
how is this managable with gl1.1(under win)?
best practices in such situation?

thnx ;)

Jens Scheddin
04-11-2005, 01:45 PM
Vertex alpha? Ofcourse, this is not per pixel but per vertex.
You could also create a different texture for different alpha values. Each texture would have the same color data but different alpha data. This consumes a lot of memory but will work even for GL 1.1 with per pixel alpha.

Hope this helps,

04-12-2005, 01:15 AM
thnx for the reply.

i succesfuly used :

glColor4f(1.0, 1.0, 1.0, alpha);is there a better way?

04-12-2005, 02:52 AM
assmax, no, this is the best method you can dream of.


04-12-2005, 08:15 AM
if you leave gl1.1 and use ARB_texture_env_combine extension, then you could give an alpha value to the texture when its rendered, using GL_CONSTANT_ARB as source for GL_COMBINE_ALPHA_ARB