# HG changeset patch # User Sam Lantinga # Date 1187150657 0 # Node ID 75daa0792bd17e1c1705d221ec159d2cbe9cdaf4 # Parent 989fb86ad1ec799dbbfa36a40309f32f409d3bcd Added code to enable multi-threaded OpenGL on Mac OS X, pending Ryan's PBO/VBO changes. diff -r 989fb86ad1ec -r 75daa0792bd1 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 +#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 {