Advertisement Jump to content


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


fast alpha blitting

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

im programming using SDL in 640x480x32, and i have a custom function called "drawRect" that draws a rectangle. its given two unsigned 32-bit integers, one for the border, one for the inside. i would like to be able to draw rectangles (and other things as well: fonts, images, etc) that are alpha blended to the background, but my current way of doing it is *WAY* too slow to be usable. how, given the background 32-bit integer color, and the "to be drawn on top" 32-bit integer color, with 8 of its bits an 0-255 alpha value, can i quickly calculate the new color to be drawn. - jeremiah

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!