summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/GLView.h2
-rw-r--r--src/Preferences.cc9
-rw-r--r--src/Preferences.h2
-rw-r--r--src/Preferences.ui14
-rw-r--r--src/glview.cc18
5 files changed, 22 insertions, 23 deletions
diff --git a/src/GLView.h b/src/GLView.h
index 8b281dd..c31e7af 100644
--- a/src/GLView.h
+++ b/src/GLView.h
@@ -82,7 +82,7 @@ private:
bool is_opencsg_capable;
bool has_shaders;
private slots:
- void display_opengl20_warning();
+ void display_opencsg_warning();
#endif
signals:
diff --git a/src/Preferences.cc b/src/Preferences.cc
index eb6af61..d240a9f 100644
--- a/src/Preferences.cc
+++ b/src/Preferences.cc
@@ -98,8 +98,8 @@ Preferences::Preferences(QWidget *parent) : QMainWindow(parent)
this, SLOT(fontFamilyChanged(const QString &)));
connect(this->fontSize, SIGNAL(editTextChanged(const QString &)),
this, SLOT(fontSizeChanged(const QString &)));
- connect(this->OpenGL20WarningCheckbox, SIGNAL(clicked(bool)),
- this, SLOT(OpenGL20WarningChanged(bool)));
+ connect(this->openCSGWarningBox, SIGNAL(clicked(bool)),
+ this, SLOT(openCSGWarningChanged(bool)));
updateGUI();
}
@@ -151,7 +151,7 @@ void Preferences::fontSizeChanged(const QString &size)
}
void
-Preferences::OpenGL20WarningChanged(bool state)
+Preferences::openCSGWarningChanged(bool state)
{
QSettings settings;
settings.setValue("editor/opengl20_warning_show",state);
@@ -215,8 +215,7 @@ void Preferences::updateGUI()
this->fontSize->setEditText(fontsize);
}
- bool opengl20_warning_show = getValue("editor/opengl20_warning_show").toBool();
- this->OpenGL20WarningCheckbox->setChecked(opengl20_warning_show);
+ this->openCSGWarningBox->setChecked(getValue("editor/opengl20_warning_show").toBool());
}
void Preferences::apply() const
diff --git a/src/Preferences.h b/src/Preferences.h
index 79fa7ab..bdc707d 100644
--- a/src/Preferences.h
+++ b/src/Preferences.h
@@ -34,7 +34,7 @@ public slots:
void colorSchemeChanged();
void fontFamilyChanged(const QString &);
void fontSizeChanged(const QString &);
- void OpenGL20WarningChanged(bool);
+ void openCSGWarningChanged(bool);
signals:
void requestRedraw() const;
diff --git a/src/Preferences.ui b/src/Preferences.ui
index 2ab7646..556172c 100644
--- a/src/Preferences.ui
+++ b/src/Preferences.ui
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>384</width>
+ <width>418</width>
<height>243</height>
</rect>
</property>
@@ -21,7 +21,7 @@
<item>
<widget class="QStackedWidget" name="stackedWidget">
<property name="currentIndex">
- <number>1</number>
+ <number>2</number>
</property>
<widget class="QWidget" name="page3DView">
<layout class="QVBoxLayout" name="verticalLayout_4">
@@ -181,9 +181,9 @@
<item>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
- <widget class="QCheckBox" name="OpenGL20WarningCheckbox">
+ <widget class="QCheckBox" name="openCSGWarningBox">
<property name="text">
- <string>Show OpenGL 2.0 warning &amp;&amp; rendering info</string>
+ <string>Show OpenCSG capability warning</string>
</property>
</widget>
</item>
@@ -239,7 +239,7 @@
<bool>true</bool>
</property>
<property name="icon">
- <iconset resource="openscad.qrc">
+ <iconset>
<normaloff>:/icons/prefs3DView.png</normaloff>:/icons/prefs3DView.png</iconset>
</property>
<property name="text">
@@ -251,7 +251,7 @@
<bool>true</bool>
</property>
<property name="icon">
- <iconset resource="openscad.qrc">
+ <iconset>
<normaloff>:/icons/prefsAdvanced.png</normaloff>:/icons/prefsAdvanced.png</iconset>
</property>
<property name="text">
@@ -263,7 +263,7 @@
<bool>true</bool>
</property>
<property name="icon">
- <iconset resource="openscad.qrc">
+ <iconset>
<normaloff>:/icons/prefsEditor.png</normaloff>:/icons/prefsEditor.png</iconset>
</property>
<property name="text">
diff --git a/src/glview.cc b/src/glview.cc
index a27d913..4360396 100644
--- a/src/glview.cc
+++ b/src/glview.cc
@@ -152,7 +152,7 @@ void GLView::initializeGL()
QSettings settings;
// FIXME: This should be an OpenCSG capability warning, not an OpenGL 2 warning
if (settings.value("editor/opengl20_warning_show",true).toBool()) {
- QTimer::singleShot(0, this, SLOT(display_opengl20_warning()));
+ QTimer::singleShot(0, this, SLOT(display_opencsg_warning()));
}
}
if (opencsg_support && this->has_shaders) {
@@ -244,10 +244,10 @@ void GLView::initializeGL()
}
#ifdef ENABLE_OPENCSG
-void GLView::display_opengl20_warning()
+void GLView::display_opencsg_warning()
{
// data
- QString title = QString("GLEW: GL_VERSION_2_0 is not supported!");
+ QString title = QString("OpenGL context is not OpenCSG capable");
QString rendererinfo;
rendererinfo.sprintf("GLEW version %s\n"
@@ -257,10 +257,10 @@ void GLView::display_opengl20_warning()
glGetString(GL_RENDERER), glGetString(GL_VENDOR),
glGetString(GL_VERSION));
- QString message = QString("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. Your renderer information is as follows:\n\n%1").arg(rendererinfo);
+ QString message = QString("Warning: Missing OpenGL capabilities for OpenCSG - OpenCSG has been disabled.\n\n"
+ "It is highly recommended to use OpenSCAD on a system with OpenGL 2.0, "
+ "or support for the framebuffer_object or pbuffer extensions. "
+ "Your renderer information is as follows:\n\n%1").arg(rendererinfo);
QString note = QString("Uncheck to hide this message in the future");
@@ -290,9 +290,9 @@ void GLView::display_opengl20_warning()
// action
connect(buttonbox, SIGNAL(accepted()), dialog, SLOT(accept()));
connect(checkbox, SIGNAL(clicked(bool)),
- Preferences::inst()->OpenGL20WarningCheckbox, SLOT(setChecked(bool)));
+ Preferences::inst()->openCSGWarningBox, SLOT(setChecked(bool)));
connect(checkbox, SIGNAL(clicked(bool)),
- Preferences::inst(), SLOT(OpenGL20WarningChanged(bool)));
+ Preferences::inst(), SLOT(openCSGWarningChanged(bool)));
dialog->exec();
}
#endif
contact: Jan Huwald // Impressum