OpenGL + Qt Not working for me



  • I try running the Hello OpenGL Tutorial and it tells me
    :-1: warning: Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c
    :-1: error: This example requires Qt to be configured with -opengl desktop

    Furthermore when I was trying to base an example off of someones OpenGlWidget class
    My compiler does not recognize any of the openGL functions such as glClearColor it will recognize all of the qt based openGL functions tho

    My System is:
    Windows 8 Pro
    Intel i7-263QM CPU @2.00 x64
    Nvidea GeForce GTX 560M
    RAM: 8

    Installed Compilers:
    Visual Studio 2012
    Visual Studio 2010

    I can get openGL to work fine when i use other libraries.. I did a project for school where i used glew, glm,soil, and sfml to use openGL and that worked flawlessly

    I installed Qt libraries 5.0.0 for Windows (VS 2010 406 MB)
    I also installed Visual Studio Add-in 1.2.0 for Qt5

    Any help is greatly appreciated


  • Moderators

    [quote author="brendan123746" date="1356818244"]I try running the Hello OpenGL Tutorial and it tells me
    :-1: warning: Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c
    :-1: error: This example requires Qt to be configured with -opengl desktop[/quote]As the message says, the "Qt libraries 5.0.0 for Windows (VS 2010 406 MB)" was compiled using ANGLE for OpenGL support. ANGLE is a conversion layer that maps OpenGL commands to DirectX commands. Qt uses this by default on Windows, because Windows only supports OpenGL 1.1 by default, which is far too old for many Qt features (particularly Qt Quick).

    To make use of the OpenGL drivers provided by your graphics card, you'll need to compile Qt yourself (e.g. see http://qt-project.org/wiki/Building-Qt-5-from-Git ), passing the `-opengl desktop' flag to the configuration script. However, if you choose this path, you'll need to ensure that the users of your programs have hardware and drivers that support the version of OpenGLyou compiled against.

    Other alternatives are:

    • Work on a Linux/Mac machine, which has better built-in OpenGL support than Windows
    • Use Qt's OpenGL wrappers, which will work with both ANGLE and native OpenGL drivers


  • [quote author="JKSH" date="1356842114"][quote author="brendan123746" date="1356818244"]I try running the Hello OpenGL Tutorial and it tells me
    :-1: warning: Qt was built with ANGLE, which provides only OpenGL ES 2.0 on top of DirectX 9.0c
    :-1: error: This example requires Qt to be configured with -opengl desktop[/quote]As the message says, the "Qt libraries 5.0.0 for Windows (VS 2010 406 MB)" was compiled using ANGLE for OpenGL support. ANGLE is a conversion layer that maps OpenGL commands to DirectX commands. Qt uses this by default on Windows, because Windows only supports OpenGL 1.1 by default, which is far too old for many Qt features (particularly Qt Quick).

    To make use of the OpenGL drivers provided by your graphics card, you'll need to compile Qt yourself (e.g. see http://qt-project.org/wiki/Building-Qt-5-from-Git ), passing the `-opengl desktop' flag to the configuration script. However, if you choose this path, you'll need to ensure that the users of your programs have hardware and drivers that support the version of OpenGLyou compiled against.

    Other alternatives are:

    • Work on a Linux/Mac machine, which has better built-in OpenGL support than Windows
    • Use Qt's OpenGL wrappers, which will work with both ANGLE and native OpenGL drivers[/quote]

    Thanks, really appreciate the input!
    Definitely not what i wanted to hear lol, but looks like i'm going to start compiling Qt lol


Log in to reply
 

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