Multisample on Mac OS X Tiger

It seems that setting a video mode with SDL with multisampling on
only works on OS X Tiger in a window. It does not seem to work
fullscreen. Is anyone else having this problem?

Here’s what our initialization looks like:

SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 1);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 2);
Uint32 screenFlags = SDL_OPENGL | SDL_OPENGLBLIT;
if (LobbySettings::GetInstance()->IsFullScreenEnabled())
screenFlags |= SDL_FULLSCREEN;
pScreen = SDL_SetVideoMode(displayWidth, displayHeight, displayDepth,
screenFlags);

if (!pScreen)
{
cout << “INIT: Unable to create video surface that supports AA;
trying without AA” << endl;
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 0);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 0);
pScreen = SDL_SetVideoMode(displayWidth, displayHeight,
displayDepth, screenFlags);
}

The exact same code provides nice fullscreen antialiasing on Windows
and Linux, but on Mac OS X Tiger it always falls into the non-
antialiased fallback in the if above, UNLESS you run in a window
(with SDL_FULLSCREEN off in the video flags).

Thanks!

SetVideoMode fails for me, too, when requesting a multisample buffer
in fullscreen, OS X

GregoryOn Feb 1, 2006, at 5:54 PM, Clay Fowler wrote:

It seems that setting a video mode with SDL with multisampling on
only works on OS X Tiger in a window. It does not seem to work
fullscreen. Is anyone else having this problem?

Here’s what our initialization looks like:

SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_GREEN_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_BLUE_SIZE, 8);
SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 1);
SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 2);
Uint32 screenFlags = SDL_OPENGL | SDL_OPENGLBLIT;
if (LobbySettings::GetInstance()->IsFullScreenEnabled())
screenFlags |= SDL_FULLSCREEN;
pScreen = SDL_SetVideoMode(displayWidth, displayHeight,
displayDepth, screenFlags);

if (!pScreen)
{
cout << “INIT: Unable to create video surface that supports AA;
trying without AA” << endl;
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 0);
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 0);
pScreen = SDL_SetVideoMode(displayWidth, displayHeight,
displayDepth, screenFlags);
}

The exact same code provides nice fullscreen antialiasing on
Windows and Linux, but on Mac OS X Tiger it always falls into the
non-antialiased fallback in the if above, UNLESS you run in a
window (with SDL_FULLSCREEN off in the video flags).

Thanks!

Multisample does not work for me, either. This is something that really
needs to be fixed.

[>] Brian