瀏覽代碼

Fix fsaa crash on OSX, can't enable multisampling before a window is created (bug #350)

Bart van Strien 13 年之前
父節點
當前提交
f58f80397e
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/modules/window/sdl/Window.cpp

+ 3 - 1
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;