这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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