Jump to content

View more

Image of the Day

#ld38 #screenshotsaturday Mimosa Fizz action gif #2 https://t.co/TUzdppvfUL
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

Alpha blending... stupid question...

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
7 replies to this topic

#1 smitty1276   Members   

560
Like
Likes
Like

Posted 08 July 2001 - 04:58 PM

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?

#2 grady   Members   

122
Like
Likes
Like

Posted 08 July 2001 - 11:39 PM

Set the alpha value through the textures quad vertices and call glTexEnvi(GL_TEXTURE_ENV, GL_TEX_ENV_MODE, GL_MODULATE);

#3 smitty1276   Members   

560
Like
Likes
Like

Posted 09 July 2001 - 08:33 AM

What do you mean the texture''s quad vertices? You mean the vertices of the quad which I am going to texture?

#4 grady   Members   

122
Like
Likes
Like

Posted 09 July 2001 - 09:01 AM

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?

#5 zedzeek   Members   

528
Like
Likes
Like

Posted 09 July 2001 - 11:05 AM

this might be of interest (i uploaded an app that explains opengl blending yesterday to my site)

http://members.xoom.com/myBollux

#6 smitty1276   Members   

560
Like
Likes
Like

Posted 09 July 2001 - 04:34 PM

Cool... thanks guys.

#7 smitty1276   Members   

560
Like
Likes
Like

Posted 09 July 2001 - 04:57 PM

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

#8 zhech   Members   

122
Like
Likes
Like

Posted 31 July 2001 - 10:07 AM

You have to disable depth testing
glDisable(GL_DEPTH_TEST);




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.