Skip to content

Commit

Permalink
renderer: Set format correctly on Wayland.
Browse files Browse the repository at this point in the history
  • Loading branch information
heinezen committed Nov 2, 2023
1 parent a630ff3 commit d900aab
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libopenage/renderer/opengl/context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand All @@ -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!");
Expand Down

0 comments on commit d900aab

Please sign in to comment.