[SDL] 2D API evolution (SDL 1.3/2.0)

Sam Lantinga slouken at devolution.com
Sun Aug 27 10:42:49 PDT 2006


> Once the transform is done, the rest of the pipeline will concist of 
> process_straight() calls, where you just do something with *src 
> and/or *dst and write the result to *dst++; repeat for 'pixel'. 
> Doesn't get any simpler than that, I think.

I'm going even simpler for SDL 2D.  I'm supporting blending options,
but no rotation, for maximum speed.  Once you get into rotation and
texel interpolation, you're better off going directly to 3D.

One of the things I'm trying to do is avoid per-span function overhead.
I did a bunch of performance testing with SDL 2D blitters a way back,
and per-span function overhead was about 10% speed reduction.

So my 2D feature set is shaping up to this:
* color fill
* color blend (?)
* copy blit
  * optional pixel format conversion
  * optional constant alpha source modulation
  * optional constant color source modulation
  * optional blend operation
  * optional destination rectangle scaling

I haven't ever found a need for solid rectangle blending, is it useful?

See ya!
	-Sam Lantinga, Senior Software Engineer, Blizzard Entertainment




More information about the SDL mailing list