Archived

This topic is now archived and is closed to further replies.

smitty1276

Alpha blending... stupid question...

Recommended Posts

smitty1276    560
If I want to draw a textured-quad that is translucent, how do I do it. Do I set the alpha value for the texture''s pixels, do I set the alpha value for the quad''s color, or do I do both?

Share this post


Link to post
Share on other sites
grady    122
Set the alpha value through the textures quad vertices and call glTexEnvi(GL_TEXTURE_ENV, GL_TEX_ENV_MODE, GL_MODULATE);

Share this post


Link to post
Share on other sites
grady    122
Yeah thats what I mean sorry for the ambiguity. The modulate env parameter will blend the color of the quad (including the alpha) with that of the texture. Have you tried it yet?

Share this post


Link to post
Share on other sites
zedzeek    528
this might be of interest (i uploaded an app that explains opengl blending yesterday to my site)

http://members.xoom.com/myBollux

Share this post


Link to post
Share on other sites
smitty1276    560
OK, I tried it out on the GLAppWiz app with the cube rotating on 3 axes. It works fine, EXCEPT occasionally one of the sides will rotate toward the front and will appear solid. Then it may rotate back around and be blended properly the next pass.

What could be causing that?

Is it because of the order in which the faces are rendered and the depth of those faces?


Edited by - smitty1276 on July 9, 2001 12:42:23 AM

Share this post


Link to post
Share on other sites