gstgl: Re-enable WINAPI on _MSC_VER

The calling convention may be deprecated, but we still need it for
OpenGL. The build issue was caused by an incorrect syntax being used for
the WINAPI (__stdcall) prototype in function pointers which was accepted
by GCC but is rejected by MSVC.
This commit is contained in:
Nirbheek Chauhan 2016-10-28 06:23:02 +05:30 committed by Tim-Philipp Müller
parent 48fcf632bd
commit d57808385c
3 changed files with 25 additions and 25 deletions

View file

@ -76,7 +76,7 @@
#pragma GCC diagnostic pop
#endif
#if defined(WINAPI) && !defined(_MSC_VER)
#if defined(WINAPI)
#define GSTGLAPI WINAPI
#else
#define GSTGLAPI

View file

@ -48,22 +48,22 @@
typedef struct _GstGLShaderVTable
{
GLuint GSTGLAPI (*CreateProgram) (void);
void GSTGLAPI (*DeleteProgram) (GLuint program);
void GSTGLAPI (*UseProgram) (GLuint program);
void GSTGLAPI (*GetAttachedShaders) (GLuint program, GLsizei maxcount,
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 GSTGLAPI (*CreateShader) (GLenum shaderType);
void GSTGLAPI (*DeleteShader) (GLuint shader);
void GSTGLAPI (*AttachShader) (GLuint program, GLuint shader);
void GSTGLAPI (*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 GSTGLAPI (*GetShaderiv) (GLuint program, GLenum pname, GLint * params);
void GSTGLAPI (*GetProgramiv) (GLuint program, GLenum pname, GLint * params);
void GSTGLAPI (*GetShaderInfoLog) (GLuint shader, GLsizei maxLength,
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,
void (GSTGLAPI *GetProgramInfoLog) (GLuint shader, GLsizei maxLength,
GLsizei * length, char *log);
} GstGLShaderVTable;

View file

@ -36,22 +36,22 @@ typedef struct _GstGLSLFuncs
{
gboolean initialized;
GLuint GSTGLAPI (*CreateProgram) (void);
void GSTGLAPI (*DeleteProgram) (GLuint program);
void GSTGLAPI (*UseProgram) (GLuint program);
void GSTGLAPI (*GetAttachedShaders) (GLuint program, GLsizei maxcount,
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 GSTGLAPI (*CreateShader) (GLenum shaderType);
void GSTGLAPI (*DeleteShader) (GLuint shader);
void GSTGLAPI (*AttachShader) (GLuint program, GLuint shader);
void GSTGLAPI (*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 GSTGLAPI (*GetShaderiv) (GLuint program, GLenum pname, GLint * params);
void GSTGLAPI (*GetProgramiv) (GLuint program, GLenum pname, GLint * params);
void GSTGLAPI (*GetShaderInfoLog) (GLuint shader, GLsizei maxLength,
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,
void (GSTGLAPI *GetProgramInfoLog) (GLuint shader, GLsizei maxLength,
GLsizei * length, char *log);
} GstGLSLFuncs;