src/render/opengl/SDL_render_gl.c
changeset 5204 daa5463466c5
parent 5203 25ffd4e5255c
child 5224 2178ffe17222
--- a/src/render/opengl/SDL_render_gl.c	Sun Feb 06 00:48:41 2011 -0800
+++ b/src/render/opengl/SDL_render_gl.c	Sun Feb 06 02:35:14 2011 -0800
@@ -88,7 +88,7 @@
 
     /* OpenGL functions */
 #define SDL_PROC(ret,func,params) ret (APIENTRY *func) params;
-#include "../../video/SDL_glfuncs.h"
+#include "SDL_glfuncs.h"
 #undef SDL_PROC
 
     void (*glTextureRangeAPPLE) (GLenum target, GLsizei length,
@@ -161,7 +161,7 @@
     } while ( 0 );
 #endif /* __SDL_NOGETPROCADDR__ */
 
-#include "../../video/SDL_glfuncs.h"
+#include "SDL_glfuncs.h"
 #undef SDL_PROC
     return 0;
 }
@@ -213,11 +213,6 @@
 
     renderer->info.flags = SDL_RENDERER_ACCELERATED;
 
-    if (GL_LoadFunctions(data) < 0) {
-        GL_DestroyRenderer(renderer);
-        return NULL;
-    }
-
     data->context = SDL_GL_CreateContext(window);
     if (!data->context) {
         GL_DestroyRenderer(renderer);
@@ -227,6 +222,12 @@
         GL_DestroyRenderer(renderer);
         return NULL;
     }
+
+    if (GL_LoadFunctions(data) < 0) {
+        GL_DestroyRenderer(renderer);
+        return NULL;
+    }
+
 #ifdef __MACOSX__
     /* Enable multi-threaded rendering */
     /* Disabled until Ryan finishes his VBO/PBO code...