Get QT Creator running with OpenGL ES2.0 using environment variables



  • Right now I'm on Windows, and I have a @$(GLES)@ environment variable setup, which I'm hoping to use with QT's QMake. I'd just specify the absolute path in the directory to this, but I'm working with other people on this project, and it makes sense if we use environment variables.

    What I need is to figure out how to get OpenGLES2 in the include path, as well as how to link it in the QMake file. My Qmake looks as follows:

    @HEADERS +=
    VFTHandler.hpp
    VertexFragmentHandler.hpp
    util.hpp
    ShaderHandler.hpp
    ShaderComparable.hpp
    Shader.hpp
    SearchTree.hpp
    pdmaths.hpp
    JniShaderGlue.hpp
    JniGlue.hpp
    GraphicsView.hpp
    GraphicsService.hpp
    GlIncludes.hpp
    FileUtility.hpp
    Debug.hpp
    Comparable.hpp

    SOURCES +=
    VFTHandler.cpp
    util.cpp
    ShaderHandler.cpp
    ShaderComparable.cpp
    Shader.cpp
    SearchTree.inl
    Main.cpp
    FileUtility.cpp
    EscSearchTree.cpp
    Debug.cpp

    LIBS += -L$(GLES)\lib -lEGL -lGLESv2
    INCLUDEPATH += $(GLES)\include@

    Note that this won't compile. Is there anything I can do with this, using environment variables? I am on windows, though a linux solution would be great as well in addition to this.



  • I use glew and setup my build like so:

    @QT += opengl

    win32|linux-g++|linux-g++-64 {
    LIBS += -lGLEW
    DEFINES += BUILD_DESKTOP USER_INTERACTION
    message(Desktop build)
    } else {
    DEFINES += BUILD_DEVICE
    message(Device build)
    }@


Log in to reply
 

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