mCRL2org/mCRL2

Ltsgraph and ltsview do not show an error when the OpenGL support is insufficient

markuzzz opened this issue · 2 comments

Recently during a training we discovered that ltsgraph and ltsview were not working properly on the machines of most of the participants. With ltsgraph they got a blank white window (even the normal UI elements did not load). With ltsview the main UI loaded but the state space was not visible.

The issue seemed to be that the laptops did not run a recent enough version of OpenGL. On one laptop we discovered that the supported OpenGL version was just 1.1. After updating the graphics driver the supported OpenGL version was 4.2 and both ltsgraph and ltsview were running fine.

The two tools should give a clear error message with the minimum required OpenGL version and prompting the user to update their graphics driver. According to @mlaveaux this functionality should already be there but apperantly it is not working.

By the way, the versions of mCRL2 we tried were the 2019 release version, the 2022 release version and the latest nighly build (yesterday).

There is already code for checking the minimal supported OpenGL version in glwidget..cpp.

if (isValid())
{
// Check the minimum run-time requirement; the pair ordering is
// lexicographical.
QPair<int, int> version = format().version();
#ifndef __APPLE__
QPair<int, int> required(3, 3);
if (version < required)
{
// Print a message to the console and show a message box.
std::stringstream message;
message << "The runtime version of OpenGL (" << version.first << "."
<< version.second
<< ") is below the least supported version of OpenGL ("
<< required.first << "." << required.second << ").";
mCRL2log(mcrl2::log::error) << message.str().c_str() << "\n";
QMessageBox box(QMessageBox::Warning, "Unsupported OpenGL Version",
message.str().c_str(), QMessageBox::Ok);
box.exec();
throw mcrl2::runtime_error("Unsupported OpenGL version.");
}
else

Although something happened to it since the last time I have worked on this. However, apparently this does not work, but I can also not test it in any way. Even my integrated graphics card supports at least OpenGL 3.3.

I have made some changes to this version check. If anybody could try to see whether it works that would be nice.