SDL doublebuffer

Hi

After bashing away on my project for a while, I decided to use the SDL_HWSURFACE with doublebuffer instead of software surface. The problem that I have is trying to flip the surface without flickering. I have been looking at those demo programs and they all seem to create either another surface or an array and blit (or memcpy if its an array) that surface to the primary display surface then flip it. I’m just somewhat confused (coming from DirectX where you had to create the backbuffer surface if you wanted one along with primary surface) and draw to the backbuffer. Where is the backbuffer stored when you create a primary surface with backbuffer enabled?

Thanks–


Talk More, Pay Less with Net2Phone Direct®, up to 1500 minutes free!
http://www.net2phone.com/cgi-bin/link.cgi?143

The SDL_Surface returned by SDL_SetVideoMode() with a SDL_DOUBLEBUFFER
flag is the backbuffer. There is no way to access the front buffer, at
least no easy ways.

Petri LatvalaOn Mon, 22 Oct 2001, fat cat wrote:

Where is the backbuffer stored when you create a primary surface with
backbuffer enabled?

And the corollary, if you specify SDL_HWSURFACE and not SDL_DOUBLEBUFFER,
then you’re writing directly to the primary surface, and you get the flicker.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment> On Mon, 22 Oct 2001, fat cat wrote:

Where is the backbuffer stored when you create a primary surface with
backbuffer enabled?

The SDL_Surface returned by SDL_SetVideoMode() with a SDL_DOUBLEBUFFER
flag is the backbuffer. There is no way to access the front buffer, at
least no easy ways.