Alpha blending and SDL_MULACCEL

I am new to graphics programming and have some problems.

When displaying png’s with alpha channel things get really slow.

SDL_video.h:

  • If ‘flag’ is (SDL_SRCALPHA|SDL_MULACCEL), alpha blending is enabled
  • with alpha pre-multiplication enabled.*
  • Alpha blend premultiplication is an optimization that cuts the actual
  • alpha blend operation in half. There are a couple of drawbacks however.

SDL_MULACCEL is not defined anywhere.
Is this a feature not implemented yet?

Is there any other way to speed up alpha blending?

Thanks!
Robert Hopland

I am new to graphics programming and have some problems.

When displaying png’s with alpha channel things get really slow.

SDL_video.h:

  • If ‘flag’ is (SDL_SRCALPHA|SDL_MULACCEL), alpha blending is enabled
  • with alpha pre-multiplication enabled.
  • Alpha blend premultiplication is an optimization that cuts the actual
  • alpha blend operation in half. There are a couple of drawbacks however.

SDL_MULACCEL is not defined anywhere.
Is this a feature not implemented yet?

Actually, it was implemented, and later removed since nobody was using it,
and the quality wasn’t that great.

You can implement precalculated alpha yourself, if you want.

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec