mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 03:00:35 +00:00
[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
2 changed files with 22 additions and 16 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue