Mercurial > sdl-ios-xcode
diff src/video/SDL_renderer_gl.c @ 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 | e57a883ffa86 |
children | 12ea0fdc0df2 |
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 {