Fixed wrong datatype for shaders and programs.
authorRyan C. Gordon <icculus@icculus.org>
Tue, 23 Aug 2011 06:27:04 -0400
changeset 5641 7b94c53df15c
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
--- a/src/render/opengl/SDL_shaders_gl.c	Wed Aug 17 23:26:58 2011 +0200
+++ b/src/render/opengl/SDL_shaders_gl.c	Tue Aug 23 06:27:04 2011 -0400
@@ -34,9 +34,9 @@
 
 typedef struct
 {
-    GLenum program;
-    GLenum vert_shader;
-    GLenum frag_shader;
+    GLhandleARB program;
+    GLhandleARB vert_shader;
+    GLhandleARB frag_shader;
 } GL_ShaderData;
 
 struct GL_ShaderContext
@@ -167,7 +167,7 @@
 };
 
 static SDL_bool
-CompileShader(GL_ShaderContext *ctx, GLenum shader, const char *defines, const char *source)
+CompileShader(GL_ShaderContext *ctx, GLhandleARB shader, const char *defines, const char *source)
 {
     GLint status;
     const char *sources[2];
--- a/test/testshader.c	Wed Aug 17 23:26:58 2011 +0200
+++ b/test/testshader.c	Tue Aug 23 06:27:04 2011 -0400
@@ -29,9 +29,9 @@
 };
 
 typedef struct {
-    GLuint program;
-    GLuint vert_shader;
-    GLuint frag_shader;
+    GLhandleARB program;
+    GLhandleARB vert_shader;
+    GLhandleARB frag_shader;
     const char *vert_source;
     const char *frag_source;
 } ShaderData;
@@ -124,7 +124,7 @@
 static PFNGLUNIFORM1IARBPROC glUniform1iARB;
 static PFNGLUSEPROGRAMOBJECTARBPROC glUseProgramObjectARB;
 
-static SDL_bool CompileShader(GLenum shader, const char *source)
+static SDL_bool CompileShader(GLhandleARB shader, const char *source)
 {
     GLint status;