[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:
parent
31a5beb3f3
commit
1a04002052
@ -46,6 +46,12 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef WINAPI
|
||||||
|
#define GSTGLAPI WINAPI
|
||||||
|
#else
|
||||||
|
#define GSTGLAPI
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "glprototypes/gstgl_compat.h"
|
#include "glprototypes/gstgl_compat.h"
|
||||||
|
|
||||||
#include <gst/gst.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_BEGIN(name, min_gl, maj_gl, in_gles, ext_suf, ext_name)
|
||||||
#define GST_GL_EXT_FUNCTION(ret, name, args) \
|
#define GST_GL_EXT_FUNCTION(ret, name, args) \
|
||||||
ret (*name) args;
|
ret GSTGLAPI (*name) args;
|
||||||
#define GST_GL_EXT_END()
|
#define GST_GL_EXT_END()
|
||||||
|
|
||||||
typedef struct _GstGLFuncs
|
typedef struct _GstGLFuncs
|
||||||
|
@ -42,23 +42,23 @@
|
|||||||
|
|
||||||
typedef struct _GstGLShaderVTable
|
typedef struct _GstGLShaderVTable
|
||||||
{
|
{
|
||||||
GLuint (*CreateProgram) (void);
|
GLuint GSTGLAPI (*CreateProgram) (void);
|
||||||
void (*DeleteProgram) (GLuint program);
|
void GSTGLAPI (*DeleteProgram) (GLuint program);
|
||||||
void (*UseProgram) (GLuint program);
|
void GSTGLAPI (*UseProgram) (GLuint program);
|
||||||
void (*GetAttachedShaders) (GLuint program, GLsizei maxcount, GLsizei * count,
|
void GSTGLAPI (*GetAttachedShaders) (GLuint program, GLsizei maxcount,
|
||||||
GLuint * shaders);
|
GLsizei * count, GLuint * shaders);
|
||||||
|
|
||||||
GLuint (*CreateShader) (GLenum shaderType);
|
GLuint GSTGLAPI (*CreateShader) (GLenum shaderType);
|
||||||
void (*DeleteShader) (GLuint shader);
|
void GSTGLAPI (*DeleteShader) (GLuint shader);
|
||||||
void (*AttachShader) (GLuint program, GLuint shader);
|
void GSTGLAPI (*AttachShader) (GLuint program, GLuint shader);
|
||||||
void (*DetachShader) (GLuint program, GLuint shader);
|
void GSTGLAPI (*DetachShader) (GLuint program, GLuint shader);
|
||||||
|
|
||||||
void (*GetShaderiv) (GLuint program, GLenum pname, GLint * params);
|
void GSTGLAPI (*GetShaderiv) (GLuint program, GLenum pname, GLint * params);
|
||||||
void (*GetProgramiv) (GLuint program, GLenum pname, GLint * params);
|
void GSTGLAPI (*GetProgramiv) (GLuint program, GLenum pname, GLint * params);
|
||||||
void (*GetShaderInfoLog) (GLuint shader, GLsizei maxLength, GLsizei * length,
|
void GSTGLAPI (*GetShaderInfoLog) (GLuint shader, GLsizei maxLength,
|
||||||
char *log);
|
GLsizei * length, char *log);
|
||||||
void (*GetProgramInfoLog) (GLuint shader, GLsizei maxLength, GLsizei * length,
|
void GSTGLAPI (*GetProgramInfoLog) (GLuint shader, GLsizei maxLength,
|
||||||
char *log);
|
GLsizei * length, char *log);
|
||||||
} GstGLShaderVTable;
|
} GstGLShaderVTable;
|
||||||
|
|
||||||
enum
|
enum
|
||||||
|
Loading…
x
Reference in New Issue
Block a user