SDL Digest, Vol 23, Issue 33

Ed,

You did you do a DisplayFormat change using SDL_DisplayFormatAlpha. That’s was what was slowing things down for me last time I checked. It will preserve the alpha, match the graphics formats so that the Blit is doing a conversion on the fly.

Terence> Message: 10

Date: Thu, 30 Mar 2006 16:36:32 +0000 (UTC)
From: Edward Byard <e_byard at yahoo.co.uk>
Subject: [SDL] SDL_image PNG slooow
To: sdl at libsdl.org
Message-ID: <loom.20060330T183017-976 at post.gmane.org>
Content-Type: text/plain; charset=us-ascii

Hi Folks,

I’m a total n00b at graphics programming so go easy on me…

I’m using the SDL_image library to load PNG files. When I try to scroll one
image (and yes it is a screen-size graphic…) the performance is terrible, like
painfully slow. If however, I convert the image to BMP - it’s so much faster,
but of course you lose the alpha capabilities.

So, why is this? I’ve got a 1.5Ghz PC (512mb) with 64mb shared VRAM. I also
tried it on another system with 1GB RAM, and the same deal. One system is XP,
the other 2K.

Hope someone can help me out…free beer for the quickest answer :slight_smile:

Regards,
Ed