Jump to content
  • Advertisement
Sign in to follow this  
Kver

SDl & TTF transparency issues

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

'Ello, I've been trying to blit blended TTF text onto another surface (with it's own alpha values), but it's only using the alpha values of the surface being blitted on. Edit: (removed useless stuff from the post) I've found that it's because I'm blending two RGBA Surfaces. Because of how SDL Treats Alpha channels, it's only keeping the alpha channel of the source. How do I set it to blend both of the alpha channels?

Share this post


Link to post
Share on other sites
Advertisement
I think you'll have to write this yourself.

Look into the getpixel and putpixel functions from the examples at the SDL doc wiki, and also SDL_LockSurface() and SDL_UnlockSurface() ( and the SDL_MUSTLOCK() macro, I believe its called ).

Share this post


Link to post
Share on other sites
Quote:
Original post by rip-off
I think you'll have to write this yourself.

Look into the getpixel and putpixel functions from the examples at the SDL doc wiki, and also SDL_LockSurface() and SDL_UnlockSurface() ( and the SDL_MUSTLOCK() macro, I believe its called ).


Thanks, I have a couple more ideas I brewed up that may be less cpu-intensive, if any of them work I'll post the result.

Thanks for the info!

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!