From 7ab63688699104adf439239cc08f5e1503d762ff Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 9 Aug 2017 14:04:46 +0200 Subject: [PATCH] Fix compil problems in utils.cpp, to be compatible with msys2/windows and linux. --- common/gal/opengl/utils.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/common/gal/opengl/utils.cpp b/common/gal/opengl/utils.cpp index e8644c876b..ea6d200f36 100644 --- a/common/gal/opengl/utils.cpp +++ b/common/gal/opengl/utils.cpp @@ -83,8 +83,17 @@ int checkGlError( const std::string& aInfo, bool aThrow ) } -static void debugMsgCallback( GLenum aSource, GLenum aType, GLuint aId, - GLenum aSeverity, GLsizei aLength, const GLchar* aMessage, void* aUserParam ) +// debugMsgCallback is a callback function for glDebugMessageCallback. +// It must have a right type on Windows +#ifdef __WINDOWS__ +#include +#define CB_TYPE APIENTRY +#else +#define CB_TYPE +#endif + +static void CB_TYPE debugMsgCallback( GLenum aSource, GLenum aType, GLuint aId, + GLenum aSeverity, GLsizei aLength, const GLchar* aMessage, const void* aUserParam ) { printf( "%s", aMessage ); }