OS X and double buffering

This should quite probably be a faq, but I haven’t seen an answer to
this anywhere.

When setting the video mode on an OS 10.2 box using sdl 1.2, I’m not
able to get double buffering to work.

Specifically, I’m using the flags HWSURFACE|FULLSCREEN|DOUBLEBUF. It
appears that I’m successfully using video memory, and it’s certainly
doing fullscreen mode correctly, but I’m getting tearing which shouldn’t
happen if vert retrace syncing is working.

Furthermore, when I look at the screen structure I get back after
setting the video mode, I’m flags doesn’t have DOUBLEBUF set.

Is this just not implemented on OS X sdl at the moment, or is there
something obvious that I might be doing wrong?

Thanks,
Justin

This should quite probably be a faq, but I haven’t seen an answer to
this anywhere.

When setting the video mode on an OS 10.2 box using sdl 1.2, I’m not
able to get double buffering to work.

Specifically, I’m using the flags HWSURFACE|FULLSCREEN|DOUBLEBUF. It
appears that I’m successfully using video memory, and it’s certainly
doing fullscreen mode correctly, but I’m getting tearing which
shouldn’t
happen if vert retrace syncing is working.

Furthermore, when I look at the screen structure I get back after
setting the video mode, I’m flags doesn’t have DOUBLEBUF set.

Is this just not implemented on OS X sdl at the moment, or is there
something obvious that I might be doing wrong?

It isn’t implemented at all. Mostly because there is no support in the
OS for it at all. You’ll have to use OpenGL to get hardware page
flipping. Yes, you are using video memory. Unfortunately, that video
memory is single-buffered.

I’m adding an FAQ for this.

Cheers,
DarrellOn Friday, December 13, 2002, at 03:01 PM, sdl-request at libsdl.org wrote:

Subject: [SDL] OS X and double buffering
Reply-To: sdl at libsdl.org