OSX: fullscreen openGL vbl syncing?

I have a question about SDL’s behavior on OSX. Apologies if this is a
known issue… I can’t see any bug
reporting forum on the site… perhaps Max Horn / Darrell Walisser can
clue me in??

Under Mac OS X, when creating a full screen double buffered context
using openGL (for filtering and
aspect scaling of 2D content, in my case) does SDL provide VBL
synchronization?

I know that AGL can do what I want, but looking at SDL_dspvideo.c it
appears DrawSprocket is being used
and I am unsure how well this is supported on OS X. Also looking at
some games that use SDL (GLTron,
ScummVM) there is very apparent tearing in fullscreen mode.

If this is a known bug/limitation of SDL on OS X, are there plans for a
fix?

thanks,
-alex

Give this a try. I think you need the Cocoa headers included.

CGLContextObj context;
long params[] = {1};

context = CGLGetCurrentContext();
CGLSetParameter(context, kCGLCPSwapInterval, params);On Tuesday, December 17, 2002, at 03:23 PM, arekkusu wrote:

I have a question about SDL’s behavior on OSX. Apologies if this is a
known issue… I can’t see any bug
reporting forum on the site… perhaps Max Horn / Darrell Walisser can
clue me in??

Under Mac OS X, when creating a full screen double buffered context
using openGL (for filtering and
aspect scaling of 2D content, in my case) does SDL provide VBL
synchronization?

I know that AGL can do what I want, but looking at SDL_dspvideo.c it
appears DrawSprocket is being used
and I am unsure how well this is supported on OS X. Also looking at
some games that use SDL (GLTron,
ScummVM) there is very apparent tearing in fullscreen mode.

If this is a known bug/limitation of SDL on OS X, are there plans for
a fix?

thanks,
-alex


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

I have a question about SDL’s behavior on OSX. Apologies if this is a
known issue… I can’t see any bug
reporting forum on the site… perhaps Max Horn / Darrell Walisser can
clue me in??

Under Mac OS X, when creating a full screen double buffered context
using openGL (for filtering and
aspect scaling of 2D content, in my case) does SDL provide VBL
synchronization?

By default, OpenGL contexts don’t use VBL sync.

I know that AGL can do what I want, but looking at SDL_dspvideo.c it
appears DrawSprocket is being used
and I am unsure how well this is supported on OS X.

I’d recommend against using DrawSprocket on OS X unless you really need
to have a Carbon application and absolutely can’t have 2 separate
binaries for either OS.

There are hacks to enable the features you want, but that involves
writing platform-specific code. They involve first calling
SDL_SetVideoMode(), then using the AGL(OS 9/Carbon) or CGL(OS X) to set
the swap parameter.

Also looking at
some games that use SDL (GLTron,
ScummVM) there is very apparent tearing in fullscreen mode.

If this is a known bug/limitation of SDL on OS X, are there plans for a
fix?

There is no GL attribute in SDL for this. We would have to add:

SDL_GL_SWAP_INTERVAL

to the API, which could be 0,1-n which controls the number of retraces
to wait for between swaps. Then, we could easily add it to the OS 9
and OS X versions of SDL. There are also other interesting attributes
like multisampling (for antialiasing), that could be handled in the
same manor. Since Mac OS X doesn’t have a system control panel to tweak
these settings (like windows does) this is really the only way to do
certain things.On Wednesday, December 18, 2002, at 03:01 PM, sdl-request at libsdl.org wrote:

From: arekkusu
To: sdl at libsdl.org
Subject: [SDL] OSX: fullscreen openGL vbl syncing?
Reply-To: sdl at libsdl.org