Jump to content
  • Advertisement
Sign in to follow this  
Kelly G

OpenGL Color-keying in OpenGL?

This topic is 4615 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 an OpenGL texture equivalant to DirectDraw's color keying (i.e. all pixels of a specified color are not drawn)? I realize that this concept has been phased-out in favor of the much more flexable alpha blending but I would like a way that I can take an OpenGL texture that I've already established with glTexImage2D (internal format RGB), and later set all the pixels of a particular color to be transparent. Is it possible, or do I already need to have added alpha values to the pixel map that I pass to glTexImage2D?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Kelly G
Is there an OpenGL texture equivalant to DirectDraw's color keying (i.e. all pixels of a specified color are not drawn)? I realize that this concept has been phased-out in favor of the much more flexable alpha blending but I would like a way that I can take an OpenGL texture that I've already established with glTexImage2D (internal format RGB), and later set all the pixels of a particular color to be transparent. Is it possible, or do I already need to have added alpha values to the pixel map that I pass to glTexImage2D?


the color keying is not hardware accelerated and so directx converts your image before uploading it to agp memory, which is also what you will have to do in opengl.

Share this post


Link to post
Share on other sites
Rasmadrak: True. I hadn't thought of that. But my old Geforce 2 has no shader support. Since this is a 2-D application anyway, I might as well keep so it runs on lousy graphics cards too. I'll keep that in mind but I might just have to add those alpha channels in instead. Thanks.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!