Fixed wrong datatype for shaders and programs.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 23 Aug 2011 06:27:04 -0400
changeset 56417b94c53df15c
parent 5640 04b5b11985c8
child 5642 4c363712deb0
Fixed wrong datatype for shaders and programs.

This is a pointer on Mac OS X, so it risked losing data in 64-bit builds.
src/render/opengl/SDL_shaders_gl.c
test/testshader.c
     1.1 --- a/src/render/opengl/SDL_shaders_gl.c	Wed Aug 17 23:26:58 2011 +0200
     1.2 +++ b/src/render/opengl/SDL_shaders_gl.c	Tue Aug 23 06:27:04 2011 -0400
     1.3 @@ -34,9 +34,9 @@
     1.4  
     1.5  typedef struct
     1.6  {
     1.7 -    GLenum program;
     1.8 -    GLenum vert_shader;
     1.9 -    GLenum frag_shader;
    1.10 +    GLhandleARB program;
    1.11 +    GLhandleARB vert_shader;
    1.12 +    GLhandleARB frag_shader;
    1.13  } GL_ShaderData;
    1.14  
    1.15  struct GL_ShaderContext
    1.16 @@ -167,7 +167,7 @@
    1.17  };
    1.18  
    1.19  static SDL_bool
    1.20 -CompileShader(GL_ShaderContext *ctx, GLenum shader, const char *defines, const char *source)
    1.21 +CompileShader(GL_ShaderContext *ctx, GLhandleARB shader, const char *defines, const char *source)
    1.22  {
    1.23      GLint status;
    1.24      const char *sources[2];
     2.1 --- a/test/testshader.c	Wed Aug 17 23:26:58 2011 +0200
     2.2 +++ b/test/testshader.c	Tue Aug 23 06:27:04 2011 -0400
     2.3 @@ -29,9 +29,9 @@
     2.4  };
     2.5  
     2.6  typedef struct {
     2.7 -    GLuint program;
     2.8 -    GLuint vert_shader;
     2.9 -    GLuint frag_shader;
    2.10 +    GLhandleARB program;
    2.11 +    GLhandleARB vert_shader;
    2.12 +    GLhandleARB frag_shader;
    2.13      const char *vert_source;
    2.14      const char *frag_source;
    2.15  } ShaderData;
    2.16 @@ -124,7 +124,7 @@
    2.17  static PFNGLUNIFORM1IARBPROC glUniform1iARB;
    2.18  static PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB;
    2.19  
    2.20 -static SDL_bool CompileShader(GLenum shader, const char *source)
    2.21 +static SDL_bool CompileShader(GLhandleARB shader, const char *source)
    2.22  {
    2.23      GLint status;
    2.24