Sign in to follow this  

SDL and Additive Blending

This topic is 4815 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'd like to use SDL (without OpenGL, just the 2D library) for a game. The one thing is, though, I'd really like to use Additive Blending for explosions and such. If I were to do this myself, fiddling with the buffer as sdl allows, would it be too slow, or would I be able to squeak by? I like the SDL 2D library, and I'd prefer not to have to switch to using SDL just as a wrapper for OpenGL just so I can use one feature...

Share this post


Link to post
Share on other sites
Even using alpha channels on the sprites is likely to be too slow unless you run with all surfaces in software at a low resolution. Write a simple test case first to see if it'll meet your speed requirements.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Quote:
Original post by PnP Bios
It would only be slow if you did the alpha in realtime. what you can do, is build alpha masks, or use TGA images which support an alpha channel.


Does sdl have support for that kind of alpha channel usage? I've looked at your tutorial listings, and I saw something on doing transparency (and color keying of course) but I didn't see anything on additive alpha...

Share this post


Link to post
Share on other sites
Quote:
Original post by Anonymous Poster
Quote:
Original post by PnP Bios
It would only be slow if you did the alpha in realtime. what you can do, is build alpha masks, or use TGA images which support an alpha channel.


Does sdl have support for that kind of alpha channel usage? I've looked at your tutorial listings, and I saw something on doing transparency (and color keying of course) but I didn't see anything on additive alpha...


The only thing you do different is use MapRGBA, instead of MAPRGB. I'm going to have to put that in somewhere...

Thanks

Share this post


Link to post
Share on other sites

This topic is 4815 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this