Skip to content

Commit

Permalink
XCB GLX: request OpenGL 4.6 / OpenGL ES 3.2 if possible
Browse files Browse the repository at this point in the history
Code was lagging a bit behind published standards.

Change-Id: I0fe07c0162a54d9eed8b539887496b9313b37aa4
Reviewed-by: Laszlo Agocs <[email protected]>
Reviewed-by: Jesus Fernandez <[email protected]>
Reviewed-by: Sean Harmer <[email protected]>
  • Loading branch information
dangelog authored and nierob committed Aug 4, 2017
1 parent 02b0f44 commit 37af667
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -221,17 +221,17 @@ void QGLXContext::init(QXcbScreen *screen, QPlatformOpenGLContext *share)

QVector<int> glVersions;
if (m_format.renderableType() == QSurfaceFormat::OpenGL) {
if (requestedVersion > 45)
if (requestedVersion > 46)
glVersions << requestedVersion;

// Don't bother with versions below 2.0
glVersions << 45 << 44 << 43 << 42 << 41 << 40 << 33 << 32 << 31 << 30 << 21 << 20;
glVersions << 46 << 45 << 44 << 43 << 42 << 41 << 40 << 33 << 32 << 31 << 30 << 21 << 20;
} else if (m_format.renderableType() == QSurfaceFormat::OpenGLES) {
if (requestedVersion > 31)
if (requestedVersion > 32)
glVersions << requestedVersion;

// Don't bother with versions below ES 2.0
glVersions << 31 << 30 << 20;
glVersions << 32 << 31 << 30 << 20;
// ES does not support any format option
m_format.setOptions(QSurfaceFormat::FormatOptions());
}
Expand Down

0 comments on commit 37af667

Please sign in to comment.