[SDL] SDL slower in fullscreen mode

Colin Vella colinvella at waldonet.net.mt
Sun Jan 16 15:06:06 PST 2005


Dave,

I'm not using SDL_DisplayFormat() because it strips away the alpha channel
from 32-bit images (since the display format is really 24 bit -
format->Amask == 0). I did try it actually and, besides disabling per-pixel
alpha it still ran slowly in fullscreen mode.
I also tried creating a temporary 32-bit hardware surface and use
SDL_ConvertSurface to turn my loaded 24- and 32-bit images to 32-bit
hardware surfaces but I still experienced the same slowdown, which is quite
bad.. circa 3 FPS!
I'm not using SDL_Delay by the way.
I have also verified that the fullscreen display surface is 32-bit.

Regards,
Colin

Message: 14
Date: Sun, 16 Jan 2005 13:05:38 -0600
From: "David Olsen" <jolynsbass at hotmail.com>
Subject: Re: [SDL] SDL slower in fullscreen mode
To: "A list for developers using the SDL library.
	\(includesSDL-announce\)"	<sdl at libsdl.org>
Message-ID: <BAY16-DAV1391828226CC623E733E06C18D0 at phx.gbl>
Content-Type: text/plain;	charset="iso-8859-1"

Colin,
Are you using SDL_DisplayFormat() to ensure that your surfaces will blit as
fast as possible? Also, check that you really are getting a 32-bit surface,
and that everything is not being converted "on-the-fly", with every
blit(Though, SDL_DisplayFormat should keep that from happening, regardless
of actual bit-depth.)
Another thing to check is: Are you using SDL_Delay() with values of less
than 10? For some reason, one application I wrote behaved very erratically
and slowly if I used anything less than 10ms as a delay. Some CPU's don't
respond well to that I guess. Just an idea.
-Dave





More information about the SDL mailing list