[681/906] win32: fix gl api calls on 32-bit

win has the bright idea of having 5 different calling conventions.
we should probably use the right one so we don't crash from stack
corruption.
This commit is contained in:
Matthew Waters 2013-06-02 07:52:30 +00:00 committed by Tim-Philipp Müller
parent 31a5beb3f3
commit 1a04002052
2 changed files with 22 additions and 16 deletions

View file

@ -46,6 +46,12 @@
# endif
#endif
#ifdef WINAPI
#define GSTGLAPI WINAPI
#else
#define GSTGLAPI
#endif
#include "glprototypes/gstgl_compat.h"
#include <gst/gst.h>
@ -76,7 +82,7 @@ typedef enum
#define GST_GL_EXT_BEGIN(name, min_gl, maj_gl, in_gles, ext_suf, ext_name)
#define GST_GL_EXT_FUNCTION(ret, name, args) \
ret (*name) args;
ret GSTGLAPI (*name) args;
#define GST_GL_EXT_END()
typedef struct _GstGLFuncs

View file

@ -42,23 +42,23 @@
typedef struct _GstGLShaderVTable
{
GLuint (*CreateProgram) (void);
void (*DeleteProgram) (GLuint program);
void (*UseProgram) (GLuint program);
void (*GetAttachedShaders) (GLuint program, GLsizei maxcount, GLsizei * count,
GLuint * shaders);
GLuint GSTGLAPI (*CreateProgram) (void);
void GSTGLAPI (*DeleteProgram) (GLuint program);
void GSTGLAPI (*UseProgram) (GLuint program);
void GSTGLAPI (*GetAttachedShaders) (GLuint program, GLsizei maxcount,
GLsizei * count, GLuint * shaders);
GLuint (*CreateShader) (GLenum shaderType);
void (*DeleteShader) (GLuint shader);
void (*AttachShader) (GLuint program, GLuint shader);
void (*DetachShader) (GLuint program, GLuint shader);
GLuint GSTGLAPI (*CreateShader) (GLenum shaderType);
void GSTGLAPI (*DeleteShader) (GLuint shader);
void GSTGLAPI (*AttachShader) (GLuint program, GLuint shader);
void GSTGLAPI (*DetachShader) (GLuint program, GLuint shader);
void (*GetShaderiv) (GLuint program, GLenum pname, GLint * params);
void (*GetProgramiv) (GLuint program, GLenum pname, GLint * params);
void (*GetShaderInfoLog) (GLuint shader, GLsizei maxLength, GLsizei * length,
char *log);
void (*GetProgramInfoLog) (GLuint shader, GLsizei maxLength, GLsizei * length,
char *log);
void GSTGLAPI (*GetShaderiv) (GLuint program, GLenum pname, GLint * params);
void GSTGLAPI (*GetProgramiv) (GLuint program, GLenum pname, GLint * params);
void GSTGLAPI (*GetShaderInfoLog) (GLuint shader, GLsizei maxLength,
GLsizei * length, char *log);
void GSTGLAPI (*GetProgramInfoLog) (GLuint shader, GLsizei maxLength,
GLsizei * length, char *log);
} GstGLShaderVTable;
enum