diff options
author | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-10-19 19:20:18 (GMT) |
---|---|---|
committer | clifford <clifford@b57f626f-c46c-0410-a088-ec61d464b74c> | 2009-10-19 19:20:18 (GMT) |
commit | b905e8e537515d80b24e77943e7a6ffcf0e6749d (patch) | |
tree | 0b88663e596f5361005119efdea31a3c4a7ba5b4 /glview.cc | |
parent | 05b2eb1b90620025ba9242477b0df688745dd0db (diff) |
Clifford Wolf:
Added OpenGL 2.0 / OpenCSG check
git-svn-id: http://svn.clifford.at/openscad/trunk@110 b57f626f-c46c-0410-a088-ec61d464b74c
Diffstat (limited to 'glview.cc')
-rw-r--r-- | glview.cc | 18 |
1 files changed, 17 insertions, 1 deletions
@@ -23,6 +23,7 @@ #include <QApplication> #include <QWheelEvent> #include <QMouseEvent> +#include <QMessageBox> #define FAR_FAR_AWAY 100000.0 @@ -53,6 +54,9 @@ GLView::GLView(QWidget *parent) : QGLWidget(parent) statusLabel = NULL; setMouseTracking(true); +#ifdef ENABLE_OPENCSG + opencsg_support = true; +#endif } extern GLint e1, e2, e3; @@ -158,11 +162,23 @@ void GLView::initializeGL() } } } else { - fprintf(stdout, "GLEW: GL_VERSION_2_0 is not supported!\n"); + opencsg_support = false; + QTimer::singleShot(0, this, SLOT(display_opengl20_warning())); } #endif /* ENABLE_OPENCSG */ } +#ifdef ENABLE_OPENCSG +void GLView::display_opengl20_warning() +{ + QMessageBox::warning(NULL, "GLEW: GL_VERSION_2_0 is not supported!", + "Warning: No support for OpenGL 2.0 found! OpenCSG View has been disabled.\n\n" + "It is highly recommended to use OpenSCAD on a system with OpenGL 2.0 " + "support. Please check if OpenGL 2.0 drivers are available for your " + "graphics hardware."); +} +#endif + void GLView::resizeGL(int w, int h) { #ifdef ENABLE_OPENCSG |