OpenGL 3.1 glBindBuffer, glDeleteBuffer, etc. calls undeclared despite glext.h and gl.h inclusion



  • Trying to use a QQuickView to render my opengl scene underneath it...

    My game started out as just glew + sdl + opengl, so i'm just using standard function calls here and trying to make qt work with it now, hopefully without glew and its junk.

    The code is below, but I am getting undefineds and I don't understand them.

    e.g.

    /fluidrenderer.cpp:47:5: error: use of undeclared identifier 'glDeleteBuffers'; did you mean 'glSelectBuffer'? [Semantic Issue]
    glDeleteBuffers(1, &m_eboWater);
    ^~~~~~~~~~~~~~~
    glSelectBuffer

    @
    #include <QOpenGLFunctions>
    #include <QOpenGLShaderProgram>
    #include <QOpenGLFramebufferObject>

    #include <GL/glext.h>

    #include <map>
    #include <string>
    #include <vector>

    class FluidRenderer : protected QOpenGLFunctions_3_1_CoreBackend@

    For platform, I'm on archlinux and nvidia's blob. This stuff worked previously..those functions are defined in glext.h but aren't being found somehow.



  • Hmmm odd. Can you try replacing the GL/glext.h with

    @
    #include <qopengl.h>
    @

    That should take care of including GL/gl.h and an equivalent of glext.h. What type of build of Qt are you using ES 2 or desktop GL?



  • Done. I'm just using archlinux-provided packages. I'd assume they were built for desktop, but I'm not sure how to check the flags it was built with.

    I don't notice any changes in particular.

    build errors:

    http://paste.kde.org/p14be92fb/


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.