Jump to content
  • Advertisement


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


Help with SDL

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

I just started using SDL today. I am able to make an image move on the screen, but I can''t figure out how to set the transparency using this statement: SDL_SetColorKey(surface, SDL_SRCCOLORKEY, SDL_MapRGB(surface->format, r, g, b)); I want to make it so green 255 is transparent, but I can''t figure out what to do with the surface->format statement. Can anyone help me out? Thanks in advance

Share this post

Link to post
Share on other sites
Please read the FAQ, particularly the section on cross posting. Anyway, the anonymous poster in the Graphics forum gave you the right advice:

SDL_SetColorKey(surface, SDL_SRCCOLORKEY, SDL_MapRGB(surface->format,0,255 ,0));

[edited by - yspotua on January 20, 2003 2:48:18 PM]

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!