finderrors.c
author Ryan C. Gordon <icculus@icculus.org>
Sun, 27 Apr 2008 05:40:53 -0400
branchtrunk
changeset 227 c6192a343fef
parent 224 4acaf8199665
child 228 fa70fd53eb59
permissions -rw-r--r--
Check return value from MOJOSHADER_glInit().
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
            glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    43
            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
    44
            #endif
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    45
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    46
            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
    47
            {
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    48
                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
    49
                break;
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    50
            } // if
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
    51
153
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    52
            if (strstr(dent->d_name, ".bytecode") == NULL)
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    53
                continue;
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    54
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    55
            total++;
170
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    56
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    57
            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
    58
            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
    59
            FILE *io = fopen(fname, "rb");
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    60
            if (io == NULL)
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    61
            {
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    62
                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
    63
                continue;
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    64
            } // if
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    65
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    66
            static unsigned char buf[1024 * 256];
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    67
            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
    68
            fclose(io);
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    69
            if (rc == -1)
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    70
            {
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    71
                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
    72
                continue;
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    73
            } // if
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    74
224
4acaf8199665 Moved finderrors.c from GL calls to MOJOSHADER_gl* functions.
Ryan C. Gordon <icculus@icculus.org>
parents: 188
diff changeset
    75
            #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
    76
            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
    77
            if (shader == NULL)
4acaf8199665 Moved finderrors.c from GL calls to MOJOSHADER_gl* functions.
Ryan C. Gordon <icculus@icculus.org>
parents: 188
diff changeset
    78
                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
    79
            else
4acaf8199665 Moved finderrors.c from GL calls to MOJOSHADER_gl* functions.
Ryan C. Gordon <icculus@icculus.org>
parents: 188
diff changeset
    80
                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
    81
            MOJOSHADER_glDeleteShader(shader);
4acaf8199665 Moved finderrors.c from GL calls to MOJOSHADER_gl* functions.
Ryan C. Gordon <icculus@icculus.org>
parents: 188
diff changeset
    82
            #else
170
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    83
            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
    84
            if (pd->error != NULL)
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    85
                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
    86
            else
224
4acaf8199665 Moved finderrors.c from GL calls to MOJOSHADER_gl* functions.
Ryan C. Gordon <icculus@icculus.org>
parents: 188
diff changeset
    87
                report("PASS: %s\n", fname);
170
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
    88
            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
    89
            #endif
153
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    90
        } // while
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    91
        closedir(dirp);
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    92
    } // if
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    93
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    94
    return total;
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    95
} // do_dir
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
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    98
int main(int argc, char **argv)
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
    99
{
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   100
    //printf("MojoShader finderrors\n");
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   101
    //printf("Compiled against version %d\n", MOJOSHADER_VERSION);
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   102
    //printf("Linked against version %d\n", MOJOSHADER_version());
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   103
    //printf("\n");
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   104
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   105
    if (argc <= 2)
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   106
        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
   107
    else
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   108
    {
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   109
        int total = 0;
170
9d71c08c756e Ripped out the multithreading from finderrors.c ...
Ryan C. Gordon <icculus@icculus.org>
parents: 169
diff changeset
   110
        int i;
224
4acaf8199665 Moved finderrors.c from GL calls to MOJOSHADER_gl* functions.
Ryan C. Gordon <icculus@icculus.org>
parents: 188
diff changeset
   111
        const char *profile = argv[1];
153
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   112
169
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
   113
        #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
   114
        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
   115
        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
   116
        SDL_SetVideoMode(640, 480, 0, SDL_OPENGL);
172
f81c6cb14140 finderrors.c now pumps event queue and paints the SDL window.
Ryan C. Gordon <icculus@icculus.org>
parents: 170
diff changeset
   117
        glClearColor(0.0f, 0.0f, 0.0f, 1.0f);
227
c6192a343fef Check return value from MOJOSHADER_glInit().
Ryan C. Gordon <icculus@icculus.org>
parents: 224
diff changeset
   118
        if (!MOJOSHADER_glInit(profile, SDL_GL_GetProcAddress, 0, 0, 0))
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
169
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
   124
        #endif
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
   125
153
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   126
        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
   127
            total += do_dir(argv[i], profile);
153
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   128
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   129
        printf("Saw %d bytecode files.\n", total);
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   130
169
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
   131
        #if FINDERRORS_COMPILE_SHADERS
224
4acaf8199665 Moved finderrors.c from GL calls to MOJOSHADER_gl* functions.
Ryan C. Gordon <icculus@icculus.org>
parents: 188
diff changeset
   132
        MOJOSHADER_glDeinit();
169
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
   133
        SDL_Quit();
7e9d90724cf8 Push parsed shaders through GLSL compiler to see what breaks.
Ryan C. Gordon <icculus@icculus.org>
parents: 153
diff changeset
   134
        #endif
153
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   135
    } // else
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   136
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   137
    return 0;
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   138
} // main
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   139
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   140
// end of finderrors.c ...
4410cc03dade Added finderrors.c to revision control.
Ryan C. Gordon <icculus@icculus.org>
parents:
diff changeset
   141