Added code to enable multi-threaded OpenGL on Mac OS X, pending Ryan's PBO/VBO
authorSam Lantinga <slouken@libsdl.org>
Wed, 15 Aug 2007 04:04:17 +0000
changeset 2246 75daa0792bd1
parent 2245 989fb86ad1ec
child 2247 93994f65c74c
Added code to enable multi-threaded OpenGL on Mac OS X, pending Ryan's PBO/VBO changes.
src/video/SDL_renderer_gl.c
--- a/src/video/SDL_renderer_gl.c	Wed Aug 15 03:52:31 2007 +0000
+++ b/src/video/SDL_renderer_gl.c	Wed Aug 15 04:04:17 2007 +0000
@@ -30,6 +30,10 @@
 #include "SDL_rect_c.h"
 #include "SDL_yuv_sw_c.h"
 
+#ifdef __MACOSX__
+#include <OpenGL/OpenGL.h>
+#endif
+
 /* OpenGL renderer implementation */
 
 /* Details on optimizing the texture path on Mac OS X:
@@ -292,6 +296,13 @@
         return NULL;
     }
 
+#ifdef __MACOSX__
+    /* Enable multi-threaded rendering */
+    /* Disabled until Ryan finishes his VBO/PBO code...
+    CGLEnable(CGLGetCurrentContext(), kCGLCEMPEngine);
+    */
+#endif
+
     if (flags & SDL_RENDERER_PRESENTVSYNC) {
         SDL_GL_SetSwapInterval(1);
     } else {