Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

Fixed wrong datatype for shaders and programs.

This is a pointer on Mac OS X, so it risked losing data in 64-bit builds.
  • Loading branch information
icculus committed Aug 23, 2011
1 parent d60b228 commit 20248ff1a7baa255b40b1508259c32184f1a69be
Showing with 8 additions and 8 deletions.
  1. +4 −4 src/render/opengl/SDL_shaders_gl.c
  2. +4 −4 test/testshader.c
@@ -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 const char *shader_source[NUM_SHADERS][2] =
};

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];
@@ -29,9 +29,9 @@ enum {
};

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 PFNGLSHADERSOURCEARBPROC glShaderSourceARB;
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;

0 comments on commit 20248ff

Please sign in to comment.