changeset 2246:75daa0792bd1

Added code to enable multi-threaded OpenGL on Mac OS X, pending Ryan's PBO/VBO changes.
author Sam Lantinga <slouken@libsdl.org>
date Wed, 15 Aug 2007 04:04:17 +0000
parents 989fb86ad1ec
children 93994f65c74c
files src/video/SDL_renderer_gl.c
diffstat 1 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 {