Jump to content
  • Advertisement

Archived

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

B4

OpenGL Transparency in OpenGL

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

Hi, I had some questions about transparency in OpenGL. I know that you need to load the textures in RGBA mode, and use glBlend() to make the transparent, but I do not understand how to actually set part of an image transparent in a paint program. For example, if I wanted all red to be transparent, how would I set this in Photoshop? And after setting this, does OpenGL not show the transparent colors? Thanks. -B4

Share this post


Link to post
Share on other sites
Advertisement
Well, the way I do transparency (it may not be the best ) is by turning on alpha with this function: glBlendFunc(GL_SRC_ALPHA,GL_SRC_COLOR);

Then, in Paint Shop Pro 7.0 I can create create an alpha map by doing this (you''ll have to figure this out for Photoshop, I know they''re different):

Masks->New->Show All
Masks->Edit (Check On)
*Draw The Mask*
Masks->Edit (Check Off)
Masks->Save to Alpha Channel
Then save in 24-bit uncompressed TGA format .



http://www.gdarchive.net/druidgames/

Share this post


Link to post
Share on other sites
i think null and void meant 32bit instaed of 24bit.

in photoshop go to the dialog with layers/channels/paths at the top click below on the create new channel button and bobs your uncle the newq channel is the alpha channel

http://members.xoom.com/myBollux

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!