Jump to content
  • Advertisement

Archived

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

JIMbond21

Color question

This topic is 5370 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 any such thing as color keying in opengl or a way to make part of a texture, a specific color, transparent without using masking or 32 bit images?

Share this post


Link to post
Share on other sites
Advertisement
Yeah..i have exactly the same problem...what I did was to make a function that will make an alpha value out of the original image(i used BMPs)... for example, as you may know, AUXDIBIMAGEREC is a struct with sizeX, sizeY, and data. The data can be interpreted as RGB grouped bytes... Now, you can decompose this data to make it have an alpha, and then compare each color with the one you have in mind...then set the alpha to 255.
Thats how I do it at least.... i hope I can change this later on.

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!