Skip to content
This repository has been archived by the owner on Feb 11, 2021. It is now read-only.

Commit

Permalink
Fixed wrong datatype for shaders and programs.
Browse files Browse the repository at this point in the history
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 20248ff
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions src/render/opengl/SDL_shaders_gl.c
Expand Up @@ -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
Expand Down Expand Up @@ -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];
Expand Down
8 changes: 4 additions & 4 deletions test/testshader.c
Expand Up @@ -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;
Expand Down Expand Up @@ -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;

Expand Down

0 comments on commit 20248ff

Please sign in to comment.