mojoshader_opengl.c
branchtrunk
changeset 250 b75c08291021
parent 249 7f928921766c
child 253 6717d8bffa79
equal deleted inserted replaced
249:7f928921766c 250:b75c08291021
     8  */
     8  */
     9 
     9 
    10 #include <stdio.h>
    10 #include <stdio.h>
    11 #include <string.h>
    11 #include <string.h>
    12 #include <stdlib.h>
    12 #include <stdlib.h>
    13 #include <stdint.h>
       
    14 #include <stdarg.h>
    13 #include <stdarg.h>
    15 #include <assert.h>
    14 #include <assert.h>
    16 
    15 
    17 #include "mojoshader.h"
    16 #include "mojoshader.h"
    18 #define GL_GLEXT_LEGACY 1
    17 #define GL_GLEXT_LEGACY 1
    19 #include "GL/gl.h"
    18 #include "GL/gl.h"
    20 #include "GL/glext.h"
    19 #include "GL/glext.h"
    21 
    20 
    22 // Get basic wankery out of the way here...
    21 // Get basic wankery out of the way here...
    23 
    22 
    24 #define STATICARRAYLEN(x) ( (sizeof ((x))) / (sizeof ((x)[0])) )
       
    25 
       
    26 typedef unsigned int uint;  // this is a printf() helper. don't use for code.
    23 typedef unsigned int uint;  // this is a printf() helper. don't use for code.
       
    24 
       
    25 #ifdef _MSC_VER
       
    26 #define snprintf _snprintf
       
    27 typedef unsigned __int8 uint8;
       
    28 typedef unsigned __int32 uint32;
       
    29 typedef unsigned __int32 int32;
       
    30 typedef
       
    31 #else
       
    32 #include <stdint.h>
    27 typedef uint8_t uint8;
    33 typedef uint8_t uint8;
    28 typedef uint32_t uint32;
    34 typedef uint32_t uint32;
    29 typedef int32_t int32;
    35 typedef int32_t int32;
       
    36 #endif
       
    37 
       
    38 #define STATICARRAYLEN(x) ( (sizeof ((x))) / (sizeof ((x)[0])) )
    30 
    39 
    31 struct MOJOSHADER_glShader
    40 struct MOJOSHADER_glShader
    32 {
    41 {
    33     const MOJOSHADER_parseData *parseData;
    42     const MOJOSHADER_parseData *parseData;
    34     GLhandleARB handle;
    43     GLhandleARB handle;