Full Screen slow

On a windows 98 environment my game runs at 12fps in windowed mode, but
in full screen mode it runs only at 2fps. I only change SDL_FULLSCREEN
in SDL_SetVideoMode function.

I don’t know how it runs on linux.

Another question… If SDL library uses DirectX, why the game runs
faster if I use DirectX directly instead SDL?

samsaga2 wrote:

On a windows 98 environment my game runs at 12fps in windowed mode, but
in full screen mode it runs only at 2fps. I only change SDL_FULLSCREEN
in SDL_SetVideoMode function.

i’d doublecheck that your surfaces are the same pixel format as the
screen. also, if you are doing a lot of pixel access to the screen and
are getting a hardware fullscreen mode, the reading and writing will be
very slow. if you are asking for a HWSURFACE or DOUBLEBUF, just stick to
blits and fills for the screen surface.

Another question… If SDL library uses DirectX, why the game runs
faster if I use DirectX directly instead SDL?

directx will fail when you ask for some sort of display mode it can’t
give you. SDL will actually give you what you ask for, and do some
behind the scenes conversions. the conversions can run a bit slower.

you’ll want to make calls to functions like SDL_VideoModeOK and
SDL_ListModes to determine what type if direct pixel formats you can
get. (just like you need to in directx)