Help - Stop Surface Blitting Flickering

OK I need lots of help.
My graphics are flickering and it bugs me.

This how I start the video…

screen = SDL_SetVideoMode(800, 600, 16,SDL_SWSURFACE|SDL_DOUBLEBUF);

If I change the pixel bit value (16) to 24 or 32. It slows down no
surprise.

I converted the surfaces to the screen format. And I setup the
transparency before hand. I’m using the SDL_FLIP to update my screen.
I read if you blit the surface before and after the SDL_Flip, that the
flickering goes away. I that one the surfaces that are getting on my
nerves but it didn’t work. My background is made up of many blits and i
didn’t think blitting them twice would help.I also notice if I save my
bitmaps with less colors in them, it speeds up the frame rate. I bet
this comes up often but I don’t know what to do.

screen = SDL_SetVideoMode(800, 600, 16,SDL_SWSURFACE|SDL_DOUBLEBUF);

Get rid of SDL_DOUBLEBUF.

–ryan.

Yep.

If you really need a s/w surface for rendering along with a double
buffered display, you have to set up the s/w surface yourself. (See
recent thread about “SemiTriple” buffering.)

//David Olofson - Programmer, Composer, Open Source Advocate

.- Audiality -----------------------------------------------.
| Free/Open Source audio engine for games and multimedia. |
| MIDI, modular synthesis, real time effects, scripting,… |
`-----------------------------------> http://audiality.org -’
http://olofson.nethttp://www.reologica.se —On Friday 10 October 2003 03.03, Ryan C. Gordon wrote:

screen = SDL_SetVideoMode(800,600,16,SDL_SWSURFACE|SDL_DOUBLEBUF);

Get rid of SDL_DOUBLEBUF.