Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. How to get OpenGL version when I'm using ANGLE-built of Qt ?
Forum Updated to NodeBB v4.3 + New Features

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

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 2.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    weiyuemin
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      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.

      (Z(:^

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved