• Advertisement

Archived

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

Alpha blending... stupid question...

This topic is 6017 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
What do you mean the texture''s quad vertices? You mean the vertices of the quad which I am going to texture?

Share this post


Link to post
Share on other sites
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
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
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
You have to disable depth testing
glDisable(GL_DEPTH_TEST);

Share this post


Link to post
Share on other sites

  • Advertisement