How to get OpenGL version when I'm using ANGLE-built of Qt ?



  • I used to print OpenGL version by the following code:

    @
    QGLFormat format;
    format.setVersion(4, 3);
    QGLFormat::setDefaultFormat(format);

    QGLWidget w;
    w.makeCurrent();
    
    //qDebug() << QGLFormat::openGLVersionFlags();
    
    QString versionString1(QLatin1String(reinterpret_cast<const char*>(glGetString(GL_VERSION))));
    qDebug() << versionString1;
    

    @

    This works (print 4.3) when I'm using the OpenGL-built of Qt. But when I changed to ANGLE-built of Qt, it print empty string.

    I'm using Qt 5, on Windows XP.

    I found qDebug() << QGLFormat::openGLVersionFlags(); can print something. But when I'm using ANGLE, it prints only 0x00000800, which means QGLFormat::OpenGL_ES_Version_2_0. But I have OpenGL 4.3 on my machine, not only OpenGL ES. The method printed the GL version that currently used at runtime (ES 2.0), not the native OpenGL version my system supported. How can I know the actual OpenGL version of target machine when I'm using ANGLE?


  • Moderators

    You can't. ANGLE is set on OpenGL ES 2.0, and it uses DirectX drivers, so your OGL drivers have no effect on it. If you want OpenGL > 2.0, you need to compile without ANGLE.


Log in to reply
 

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