From f58f80397ecf5f87c6e628bc957963832553c7c3 Mon Sep 17 00:00:00 2001 From: Bart van Strien Date: Fri, 6 Jan 2012 17:04:48 +0100 Subject: [PATCH] Fix fsaa crash on OSX, can't enable multisampling before a window is created (bug #350) --- src/modules/window/sdl/Window.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/window/sdl/Window.cpp b/src/modules/window/sdl/Window.cpp index 2967d6123..f8fe6b6d2 100644 --- a/src/modules/window/sdl/Window.cpp +++ b/src/modules/window/sdl/Window.cpp @@ -99,7 +99,6 @@ namespace sdl { SDL_GL_SetAttribute( SDL_GL_MULTISAMPLEBUFFERS, 1 ) ; SDL_GL_SetAttribute( SDL_GL_MULTISAMPLESAMPLES, fsaa ) ; - glEnable(GL_MULTISAMPLE); } // Fullscreen? @@ -137,6 +136,9 @@ namespace sdl height = videoinfo->current_h; } + if (fsaa > 0) + glEnable(GL_MULTISAMPLE); + GLint buffers; GLint samples;