[SDL] Blitting speeds

Prasanth Kumar kumar1 at home.com
Wed Aug 25 23:33:03 PDT 1999


Prasanth Kumar wrote:
> 
> John Garrison wrote:
> >
> > > I'm kind of new to SDL but did you do a 'DisplayFormat' operation
> > > before you
> > > do blitting? If the pixel format differs between the two surfaces,
> > > SDL will
> > > do a conversion while it is blitting.
> > >
> >
> > Well, I when I added this code as well as closed down some apps to
> > free up memory the framerate jumped from 13 to 24, but no other
> > programs benefited, could the free memory make a 13-24 difference (I
> > never tested this program but once so I don't know how it runs with
> > full memory available.  It doesn't really make sense that the other
> > programs didn't improve any, this should have made a difference
> > shouldn't it?
> <snip>
> 
> The other thing to consider is whether you are running the best suited
> SDL video mode? If not, then every time it is blitted to the screen
> would
> it need to do the pixel format conversion? They documentation suggest
> you
> convert the bitmaps (sprites) to match the best video mode and blit
> that.
<snip>
I tried playing around with the 'testsprite' program which comes with
SDL. I get around 34 fps with 300 sprites and 280 fps with 3 sprites. 
There was not a hugh variation regardless of pixel depth or video flags
or even DisplayFormat usage interestingly enough.

-- 
Prasanth Kumar
kumar1 at home.com



More information about the SDL mailing list