trikker trikker - 1 year ago 105
C++ Question

How to do hardware accelerated alpha blending in SDL?

I'm trying to find the most efficient way to alpha blend in SDL. I don't feel like going back and rewriting rendering code to use OpenGL instead (which I've read is much more efficient with alpha blending), so I'm trying to figure out how I can get the most juice out of SDL's alpha blending.

I've read that I could benefit from using hardware surfaces, but this means I'd have to run the game in fullscreen. Can anyone comment on this? Or anything else regarding alpha transparency in SDL?

Answer Source

Decided to just not use alpha blending for that part. Pixel blending is too much for software surfaces, and OpenGL is needed when you want the power of your hardware.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download