finderrors.c
author Ryan C. Gordon <icculus@icculus.org>
Mon, 28 Apr 2008 05:50:02 -0400
branchtrunk
changeset 237 09f35dfc1d7e
parent 228 fa70fd53eb59
child 238 e98f14da2897
permissions -rw-r--r--
OpenGL glue now allows for multiple contexts.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
153
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     1
#include <stdio.h>
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     2
#include <stdlib.h>
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     3
#include <string.h>
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     4
#include <stdarg.h>
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     5
#include <sys/types.h>
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     6
#include <dirent.h>
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     7
#include <errno.h>
169
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
     8
#include <unistd.h>
153
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
     9
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    10
#include "mojoshader.h"
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    11
169
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
    12
#define FINDERRORS_COMPILE_SHADERS 1
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
    13
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
    14
#if FINDERRORS_COMPILE_SHADERS
174
0eb9e160ff7f Patched finderrors to build on Linux again.
Ryan C. Gordon <icculus@icculus.org>
parents: 172
diff changeset
    15
#define GL_GLEXT_PROTOTYPES 1
188
2b43d053d9cd Patched to compile on Mac OS X.
Ryan C. Gordon <icculus@icculus.org>
parents: 174
diff changeset
    16
#define GL_GLEXT_LEGACY 1
169
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
    17
#include "SDL.h"
174
0eb9e160ff7f Patched finderrors to build on Linux again.
Ryan C. Gordon <icculus@icculus.org>
parents: 172
diff changeset
    18
#include "gl.h"
0eb9e160ff7f Patched finderrors to build on Linux again.
Ryan C. Gordon <icculus@icculus.org>
parents: 172
diff changeset
    19
#include "glext.h"
169
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
    20
#endif
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
    21
170
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    22
#define report printf
169
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
    23
170
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    24
static int do_dir(const char *dname, const char *profile)
153
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    25
{
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    26
    const int dirlen = strlen(dname) + 1;
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    27
    int total = 0;
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    28
    DIR *dirp = opendir(dname);
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    29
    if (dirp != NULL)
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    30
    {
172
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    31
        int do_quit = 0;
153
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    32
        struct dirent *dent;
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    33
        while ((dent = readdir(dirp)) != NULL)
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    34
        {
172
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    35
            #if FINDERRORS_COMPILE_SHADERS
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    36
            SDL_Event e;  // pump event queue to keep OS happy.
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    37
            while (SDL_PollEvent(&e))
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    38
            {
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    39
                if (e.type == SDL_QUIT)
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    40
                    do_quit = 1;
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    41
            } // while
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    42
            SDL_GL_SwapBuffers();
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    43
            #endif
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    44
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    45
            if (do_quit)
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    46
            {
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    47
                report("FAIL: user requested quit!\n");
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    48
                break;
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    49
            } // if
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    50
153
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    51
            if (strstr(dent->d_name, ".bytecode") == NULL)
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    52
                continue;
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    53
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    54
            total++;
170
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    55
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    56
            char *fname = (char *) alloca(strlen(dent->d_name) + dirlen);
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    57
            sprintf(fname, "%s/%s", dname, dent->d_name);
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    58
            FILE *io = fopen(fname, "rb");
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    59
            if (io == NULL)
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    60
            {
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    61
                report("FAIL: %s fopen() failed.\n", fname);
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    62
                continue;
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    63
            } // if
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    64
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    65
            static unsigned char buf[1024 * 256];
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    66
            int rc = fread(buf, 1, sizeof (buf), io);
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    67
            fclose(io);
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    68
            if (rc == -1)
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    69
            {
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    70
                report("FAIL: %s %s\n", fname, strerror(errno));
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    71
                continue;
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    72
            } // if
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    73
224
4acaf8199665 Moved finderrors.c from GL calls to MOJOSHADER_gl* functions.
Ryan C. Gordon <icculus@icculus.org>
parents: 188
diff changeset
    74
            #if FINDERRORS_COMPILE_SHADERS
4acaf8199665 Moved finderrors.c from GL calls to MOJOSHADER_gl* functions.
Ryan C. Gordon <icculus@icculus.org>
parents: 188
diff changeset
    75
            MOJOSHADER_glShader *shader = MOJOSHADER_glCompileShader(buf, rc);
4acaf8199665 Moved finderrors.c from GL calls to MOJOSHADER_gl* functions.
Ryan C. Gordon <icculus@icculus.org>
parents: 188
diff changeset
    76
            if (shader == NULL)
4acaf8199665 Moved finderrors.c from GL calls to MOJOSHADER_gl* functions.
Ryan C. Gordon <icculus@icculus.org>
parents: 188
diff changeset
    77
                report("FAIL: %s %s\n", fname, MOJOSHADER_glGetError());
4acaf8199665 Moved finderrors.c from GL calls to MOJOSHADER_gl* functions.
Ryan C. Gordon <icculus@icculus.org>
parents: 188
diff changeset
    78
            else
4acaf8199665 Moved finderrors.c from GL calls to MOJOSHADER_gl* functions.
Ryan C. Gordon <icculus@icculus.org>
parents: 188
diff changeset
    79
                report("PASS: %s\n", fname);
4acaf8199665 Moved finderrors.c from GL calls to MOJOSHADER_gl* functions.
Ryan C. Gordon <icculus@icculus.org>
parents: 188
diff changeset
    80
            MOJOSHADER_glDeleteShader(shader);
4acaf8199665 Moved finderrors.c from GL calls to MOJOSHADER_gl* functions.
Ryan C. Gordon <icculus@icculus.org>
parents: 188
diff changeset
    81
            #else
170
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    82
            const MOJOSHADER_parseData *pd = MOJOSHADER_parse(profile, buf, rc, 0, 0, 0);
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    83
            if (pd->error != NULL)
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    84
                report("FAIL: %s %s\n", fname, pd->error);
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    85
            else
224
4acaf8199665 Moved finderrors.c from GL calls to MOJOSHADER_gl* functions.
Ryan C. Gordon <icculus@icculus.org>
parents: 188
diff changeset
    86
                report("PASS: %s\n", fname);
170
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    87
            MOJOSHADER_freeParseData(pd);
224
4acaf8199665 Moved finderrors.c from GL calls to MOJOSHADER_gl* functions.
Ryan C. Gordon <icculus@icculus.org>
parents: 188
diff changeset
    88
            #endif
153
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    89
        } // while
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    90
        closedir(dirp);
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    91
    } // if
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    92
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    93
    return total;
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    94
} // do_dir
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    95
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    96
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    97
int main(int argc, char **argv)
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    98
{
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    99
    //printf("MojoShader finderrors\n");
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   100
    //printf("Compiled against version %d\n", MOJOSHADER_VERSION);
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   101
    //printf("Linked against version %d\n", MOJOSHADER_version());
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   102
    //printf("\n");
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   103
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   104
    if (argc <= 2)
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   105
        printf("\n\nUSAGE: %s <profile> [dir1] ... [dirN]\n\n", argv[0]);
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   106
    else
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   107
    {
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   108
        int total = 0;
170
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
   109
        int i;
224
4acaf8199665 Moved finderrors.c from GL calls to MOJOSHADER_gl* functions.
Ryan C. Gordon <icculus@icculus.org>
parents: 188
diff changeset
   110
        const char *profile = argv[1];
153
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   111
169
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
   112
        #if FINDERRORS_COMPILE_SHADERS
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
   113
        SDL_Init(SDL_INIT_VIDEO);
224
4acaf8199665 Moved finderrors.c from GL calls to MOJOSHADER_gl* functions.
Ryan C. Gordon <icculus@icculus.org>
parents: 188
diff changeset
   114
        SDL_GL_LoadLibrary(NULL);
169
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
   115
        SDL_SetVideoMode(640, 480, 0, SDL_OPENGL);
237
09f35dfc1d7e OpenGL glue now allows for multiple contexts.
Ryan C. Gordon <icculus@icculus.org>
parents: 228
diff changeset
   116
        MOJOSHADER_glContext *ctx;
09f35dfc1d7e OpenGL glue now allows for multiple contexts.
Ryan C. Gordon <icculus@icculus.org>
parents: 228
diff changeset
   117
        ctx = MOJOSHADER_glInit(profile, SDL_GL_GetProcAddress, 0, 0, 0);
09f35dfc1d7e OpenGL glue now allows for multiple contexts.
Ryan C. Gordon <icculus@icculus.org>
parents: 228
diff changeset
   118
        if (ctx == NULL)
227
c6192a343fef Check return value from MOJOSHADER_glInit().
Ryan C. Gordon <icculus@icculus.org>
parents: 224
diff changeset
   119
        {
c6192a343fef Check return value from MOJOSHADER_glInit().
Ryan C. Gordon <icculus@icculus.org>
parents: 224
diff changeset
   120
            printf("MOJOSHADER_glInit() fail: %s\n", MOJOSHADER_glGetError());
c6192a343fef Check return value from MOJOSHADER_glInit().
Ryan C. Gordon <icculus@icculus.org>
parents: 224
diff changeset
   121
            SDL_Quit();
c6192a343fef Check return value from MOJOSHADER_glInit().
Ryan C. Gordon <icculus@icculus.org>
parents: 224
diff changeset
   122
            return 1;
c6192a343fef Check return value from MOJOSHADER_glInit().
Ryan C. Gordon <icculus@icculus.org>
parents: 224
diff changeset
   123
        } // if
237
09f35dfc1d7e OpenGL glue now allows for multiple contexts.
Ryan C. Gordon <icculus@icculus.org>
parents: 228
diff changeset
   124
        MOJOSHADER_glMakeContextCurrent(ctx);
169
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
   125
        #endif
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
   126
153
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   127
        for (i = 2; i < argc; i++)
170
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
   128
            total += do_dir(argv[i], profile);
153
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   129
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   130
        printf("Saw %d bytecode files.\n", total);
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   131
169
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
   132
        #if FINDERRORS_COMPILE_SHADERS
237
09f35dfc1d7e OpenGL glue now allows for multiple contexts.
Ryan C. Gordon <icculus@icculus.org>
parents: 228
diff changeset
   133
        MOJOSHADER_glDeinit(ctx);
169
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
   134
        SDL_Quit();
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
   135
        #endif
153
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   136
    } // else
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   137
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   138
    return 0;
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   139
} // main
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   140
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   141
// end of finderrors.c ...
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   142