testparse.c
author icculus
Fri, 14 Mar 2008 07:07:49 -0400
branchtrunk
changeset 18 0dbdb2be8bf8
parent 14 7075b6e31471
child 37 63b5ba0bcda0
permissions -rw-r--r--
[svn] Bunch More Work. Cleanups, added app-supplied allocators, flexible output, etc.

#include <stdio.h>
#include <stdlib.h>
#include "d3d2glsl.h"

int main(int argc, char **argv)
{
    if (argv[1] != NULL)
    {
        FILE *io = fopen(argv[1], "rb");
        if (io != NULL)
        {
            unsigned char *buf = (unsigned char *) malloc(1000000);
            int rc = fread(buf, 1, 1000000, io);
            fclose(io);
            D3D2GLSL_parse("d3d", buf, rc, NULL, NULL);
            free(buf);
        } // if
    } // if

    return 0;
} // main

// end of testparse.c ...