Fix of 2.1.0-beta2 Linux AppImage - OpenGL detection fails #2844

The OpenGL check was moved to GLCanvas3DManager init function,
where the OpenGL context is active at the 1st render event.
This commit is contained in:
bubnikv 2019-08-30 09:19:45 +02:00
parent 78697b2acf
commit b305a6b37e
2 changed files with 14 additions and 15 deletions

View file

@ -266,6 +266,20 @@ void GLCanvas3DManager::init_gl()
s_compressed_textures_supported = true;
else
s_compressed_textures_supported = false;
if (! s_gl_info.is_version_greater_or_equal_to(2, 0)) {
// Complain about the OpenGL version.
wxString message = wxString::Format(
_(L("PrusaSlicer requires OpenGL 2.0 capable graphics driver to run correctly, \n"
"while OpenGL version %s, render %s, vendor %s was detected.")), wxString(s_gl_info.get_version()), wxString(s_gl_info.get_renderer()), wxString(s_gl_info.get_vendor()));
message += "\n";
message += _(L("You may need to update your graphics card driver."));
#ifdef _WIN32
message += "\n";
message += _(L("As a workaround, you may run PrusaSlicer with a software rendered 3D graphics by running prusa-slicer.exe with the --sw_renderer parameter."));
#endif
wxMessageBox(message, wxString("PrusaSlicer - ") + _(L("Unsupported OpenGL version")), wxOK | wxICON_ERROR);
}
}
}