Jump to content
  • Advertisement

Archived

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

LeeDawg

transparency

This topic is 5711 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

Is there a way to make everything transparent except one image(a dialog image in my case) similar to how windows XP does it when it shuts down? Thanks

Share this post


Link to post
Share on other sites
Advertisement
That would be kind of a pain in the butt! Isn''t there some function or something that could do this? I need the game to pause as this happens so maybe the solution would be to take a screen shot and seamlessly display it as the background(instead of the actual objects) and make it grayscale. Then I could draw the colored dialog over top of it. I''m not sure how I would do this though. Any other ideas?

Share this post


Link to post
Share on other sites
That brings up another issue. My interface is in ortho mode and the transparent dialogs blend beautifully with the game objects which are drawn in perspective mode. However when two transparent objects in ortho mode cross over each other the one on top cancels out the one on bottom and shows right through to the perspective objects. If I can fix this then the transparent quad idea would be perfect. I''ve spent hours trying different blending functions but nothing seems to fix it.

Share this post


Link to post
Share on other sites
iwaskia is correct.
draw your sceen normally then
switch to ortho
enable blending with src_alpha -1minus_alpha
(set color to 1,1,1,0.5
turn off lighting etc
draw a fullscreen quad.
then draw the dialog.
u may need to turn off depth testing

http://uk.geocities.com/sloppyturds/kea/kea.html
http://uk.geocities.com/sloppyturds/gotterdammerung.html

Share this post


Link to post
Share on other sites
Dont turn off depth testing, just use glDepthMask(GL_FALSE) for transparent objects and glDepthMask(GL_TRUE) when your''re drawing solid ones - it makes the depth buffer read only.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!