Qt World Summit: Submit your Presentation

QOpenGLWidget and glDebugMessageCallback

  • Hi,

    since a few days I#m working on a Qt OpenGL program. It's working fine so far (I'm using QOpenGLWidget in Qt 5.12).
    Now I added some code for OpenGL debugging and for some reason I get this error message:

    D:\Daten\Develop\Qt\Test\OpenGL1\newglwidget.cpp:128: Fehler: use of undeclared identifier 'glDebugMessageCallback'

    I already added this include-files, but still no luck...

    #include <QOpenGLExtraFunctions>
    #include <QOpenGLFunctions_4_5_Core>
    #include <qopenglfunctions_4_5_compatibility.h>

    My graphic card supports OpenGL 4.5, so this shouldn't be the issue...

    Any Ideas?

    Thanks in advance,

  • Hi,

    fixed it (in fact some days ago already):

       QOpenGLFunctions_4_5_Core *f;
        f = QOpenGLContext::currentContext()->versionFunctions<QOpenGLFunctions_4_5_Core>();

Log in to reply