Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

How can I get actual installed GL version (not GL version being used in current context)?

$
0
0
This may not be the best way but what you could try to do is create an OpenGL context using a fake, high version and then check what was actually created. In QOpenGLContext’s docs: “If the OpenGL implementation on your system does not support the requested version of OpenGL context, then QOpenGLContext will try to create the closest matching version.” Example: QSurfaceFormat requestedFormat; requestedFormat.setVersion( 99, 99 );   QOpenGLContext* context = new QOpenGLContext; context->setFormat( requestedFormat ); context->create();   qDebug() << QString("Requested OpenGL version (%1.%2); Actual created version (%3.%4).").arg(requestedFormat.majorVersion()).arg(requestedFormat.minorVersion()).arg(context->format().majorVersion()).arg(context->format().minorVersion());

Viewing all articles
Browse latest Browse all 4972

Trending Articles