2025-07-20 16:39 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004510Spring engineLinuxpublic2014-08-20 15:40
ReporterSvenstaro 
Assigned Toabma 
PrioritynormalSeverityblockReproducibilityalways
StatusresolvedResolutionfixed 
Product Version 
Target VersionFixed in Version 
Summary0004510: fails to build on glew 1.11
Descriptionglew 1.11 adjusted the OpenGLDebugMessageCallback signature slightly. I attached a patch to fix that. I do not know how that will work out on glew <1.11 so that should get a test compile before merging the patch.
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files
  • patch file icon glew1.11.patch (618 bytes) 2014-08-19 20:57 -
    diff --git a/rts/Rendering/GL/myGL.cpp b/rts/Rendering/GL/myGL.cpp
    index 07b7472..41c9a78 100644
    --- a/rts/Rendering/GL/myGL.cpp
    +++ b/rts/Rendering/GL/myGL.cpp
    @@ -76,7 +76,7 @@ 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;
    
    patch file icon glew1.11.patch (618 bytes) 2014-08-19 20:57 +

-Relationships
+Relationships

-Notes

~0013536

jK (developer)

check the opengl docs, the definition is correct as is

~0013537

cleanrock (reporter)

glew changed this in
https://github.com/nigels-com/glew/commit/1aff81c823587bd3dd2384401d3aaf4ec40259dc
I guess they just follow what https://www.opengl.org/registry/specs/ARB/debug_output.txt say:
    The callback function that applications can define, and
    is accepted by DebugMessageCallbackARB, is defined as:
    
        typedef void (APIENTRY *DEBUGPROCARB)(enum source,
                                              enum type,
                                              uint id,
                                              enum severity,
                                              sizei length,
                                              const char* message,
                                              const void* userParam);

    Note that this function pointer is defined as having the
    same calling convention as the GL functions.

~0013538

abma (administrator)

ideas for a cleaner way to workarround the changed signature?

is there a way to check which version of glew is used?

if so, sth. like

#idfdef GLEW_VERSION >= 1.11
signature1()...
#else
signature2()...
#endif

would work...
+Notes

-Issue History
Date Modified Username Field Change
2014-08-19 20:57 Svenstaro New Issue
2014-08-19 20:57 Svenstaro File Added: glew1.11.patch
2014-08-20 09:11 jK Note Added: 0013536
2014-08-20 10:06 cleanrock Note Added: 0013537
2014-08-20 15:38 abma Changeset attached => spring develop a8d614dd
2014-08-20 15:38 abma Assigned To => abma
2014-08-20 15:38 abma Status new => resolved
2014-08-20 15:38 abma Resolution open => fixed
2014-08-20 15:40 abma Note Added: 0013538
+Issue History