Important: Please read the Qt Code of Conduct -

Can't Use OpenGL ES 2.0 identifiers

  • Hello all,

    I have picked up a book on OpenGL ES 2.0 in order to learn its details. In doing so, I have found debugging code in the book that I can't use on Qt. The debugging code uses identifiers such as GL_SHADER_COMPILER, GL_NUM_SHADER_BINARY_FORMATS, GL_SHADER_BINARY_FORMATS, etc...

    Qt Designer will even open up the drop-down menu for me to select these identifiers. However, when I build the program I get "use of undeclared identifier ... "

    Here is the kicker: during my draw code, I can use GL_TRIANGLES just fine.

    Here is a list of all includes I have I think would include those identifiers:

    #include <QCoreApplication>
    #include <QScreen>
    #include <QPainter>
    #include <qopengl.h>
    #include <QOpenGLContext>
    #include <QOpenGLPaintDevice>
    #include <QOpenGLShaderProgram>
    #include <QWindow>
    #include <QOpenGLFunctions>

    Now, this identifiers are not imperative, but they would be nice to have in order to write some debugging code of my own. What I am trying to do is find out is the format of my shader compiler, and the book's sample code uses these identifiers.

    What am I missing to use those identifiers???

    Thanks in advance.

Log in to reply