From d900aabbbe759c8a695002b8a4a651a7113cc7f2 Mon Sep 17 00:00:00 2001 From: heinezen Date: Thu, 2 Nov 2023 23:24:57 +0100 Subject: [PATCH] renderer: Set format correctly on Wayland. --- libopenage/renderer/opengl/context.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libopenage/renderer/opengl/context.cpp b/libopenage/renderer/opengl/context.cpp index d65fe4aae1..91e2fb431b 100644 --- a/libopenage/renderer/opengl/context.cpp +++ b/libopenage/renderer/opengl/context.cpp @@ -29,10 +29,11 @@ gl_context_spec GlContext::find_spec() { for (size_t i_ver = 0; i_ver < gl_versions.size(); ++i_ver) { QOpenGLContext test_context{}; - auto tf = test_format; + test_format.setMajorVersion(gl_versions[i_ver].first); test_format.setMinorVersion(gl_versions[i_ver].second); + test_context.setFormat(test_format); test_context.create(); if (!test_context.isValid()) { @@ -49,6 +50,7 @@ gl_context_spec GlContext::find_spec() { } QOpenGLContext test_context{}; + test_context.setFormat(test_format); test_context.create(); if (!test_context.isValid()) { throw Error(MSG(err) << "Failed to create OpenGL context which previously succeeded. This should not happen!");