mirror of
https://github.com/overte-org/overte.git
synced 2025-04-16 21:02:17 +02:00
Add messageBox for no gl support
This commit is contained in:
parent
caf2595e13
commit
a34e6773a9
1 changed files with 15 additions and 1 deletions
|
@ -25,8 +25,22 @@ OpenGLVersionChecker::OpenGLVersionChecker(int& argc, char** argv) :
|
|||
bool OpenGLVersionChecker::isValidVersion() {
|
||||
bool valid = true;
|
||||
|
||||
// Retrieve OpenGL version
|
||||
GLWidget* glWidget = new GLWidget();
|
||||
valid = glWidget->isValid();
|
||||
// Inform user if no OpenGL support
|
||||
if (!valid) {
|
||||
QMessageBox messageBox;
|
||||
messageBox.setWindowTitle("Missing OpenGL Support");
|
||||
messageBox.setIcon(QMessageBox::Warning);
|
||||
messageBox.setText(QString().sprintf("Your system does not support OpenGL, Interface cannot run."));
|
||||
messageBox.setInformativeText("Press OK to exit.");
|
||||
messageBox.setStandardButtons(QMessageBox::Ok);
|
||||
messageBox.setDefaultButton(QMessageBox::Ok);
|
||||
messageBox.exec();
|
||||
return false;
|
||||
}
|
||||
|
||||
// Retrieve OpenGL version
|
||||
glWidget->initializeGL();
|
||||
QString glVersion = QString((const char*)glGetString(GL_VERSION));
|
||||
delete glWidget;
|
||||
|
|
Loading…
Reference in a new issue