Skip to content

Commit

Permalink
fix #4510 (compile error with glew 1.11)
Browse files Browse the repository at this point in the history
thanks Svenstaro!
  • Loading branch information
abma committed Aug 20, 2014
1 parent 79afdd8 commit a8d614d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions rts/Rendering/GL/myGL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,8 @@ void PrintAvailableResolutions()
#else
#define _APIENTRY
#endif
void _APIENTRY OpenGLDebugMessageCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, GLvoid* userParam)

void _APIENTRY OpenGLDebugMessageCallback(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar* message, const GLvoid* userParam)
{
std::string sourceStr;
std::string typeStr;
Expand Down Expand Up @@ -340,7 +341,8 @@ void LoadExtensions()
#if defined(GL_ARB_debug_output) && !defined(HEADLESS)
if (GLEW_ARB_debug_output && configHandler->GetBool("DebugGL")) {
LOG("Installing OpenGL-DebugMessageHandler");
glDebugMessageCallbackARB(&OpenGLDebugMessageCallback, NULL);
//typecast is a workarround for #4510, signature of the callback message changed :-|
glDebugMessageCallbackARB((GLDEBUGPROCARB)&OpenGLDebugMessageCallback, NULL);

if (configHandler->GetBool("DebugGLStacktraces")) {
// The callback should happen in the thread that made the gl call
Expand Down

0 comments on commit a8d614d

Please sign in to comment.