1. Jason McKesson
  2. glLoadGen
  3. Issues
Issue #52 new

Clash with QtGLWidgets (Linux / Mac)

Anonymous created an issue

I have found that when I use your code with Qt I get many errors due to re-definitions of some of the typedefs.

To fix this I have modifed the code in the header as follows

    // added to remove a clash with Qt
    #ifndef GL_KHR_debug
    #define GL_KHR_debug
            typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
    #endif
    #ifndef GL_KHR_debug
    #define GL_KHR_debug
            typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
    #endif
    #ifndef GL_AMD_debug_output
    #define GL_AMD_debug_output
            typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,void *userParam);
    #endif

It now works well and thanks for all the hard work I've actually ditched GLEW and use this exclusively with my teaching library.

Comments (3)

  1. Shaun Reich

    thank you! i needed this as well. exactly as stated above, too. (those 3 functions were the only real ones erroring out)

    having to patch this manually is a pain. i would patch glloadgen, but i don't really know how it works.

    i also get other problems because qt includes gl.h, and glloadgen errors on that for some reason. but qt needs glloadgen to be included after it.

    so it's like a catch-22. so i had to remove the #error, now it compiles (not sure if it works well or not yet), but about 3-6 warnings on some redefinitions...so maybe those ones are just oversights as well?

  2. Log in to comment