finderrors.c
branchtrunk
changeset 237 09f35dfc1d7e
parent 228 fa70fd53eb59
child 238 e98f14da2897
--- a/finderrors.c	Mon Apr 28 04:49:02 2008 -0400
+++ b/finderrors.c	Mon Apr 28 05:50:02 2008 -0400
@@ -113,12 +113,15 @@
         SDL_Init(SDL_INIT_VIDEO);
         SDL_GL_LoadLibrary(NULL);
         SDL_SetVideoMode(640, 480, 0, SDL_OPENGL);
-        if (!MOJOSHADER_glInit(profile, SDL_GL_GetProcAddress, 0, 0, 0))
+        MOJOSHADER_glContext *ctx;
+        ctx = MOJOSHADER_glInit(profile, SDL_GL_GetProcAddress, 0, 0, 0);
+        if (ctx == NULL)
         {
             printf("MOJOSHADER_glInit() fail: %s\n", MOJOSHADER_glGetError());
             SDL_Quit();
             return 1;
         } // if
+        MOJOSHADER_glMakeContextCurrent(ctx);
         #endif
 
         for (i = 2; i < argc; i++)
@@ -127,7 +130,7 @@
         printf("Saw %d bytecode files.\n", total);
 
         #if FINDERRORS_COMPILE_SHADERS
-        MOJOSHADER_glDeinit();
+        MOJOSHADER_glDeinit(ctx);
         SDL_Quit();
         #endif
     } // else