Commit 60d919f3 authored by Martin Schultz's avatar Martin Schultz

* separated Qt Functions which require QOpenGL from functions which

require regular opengl in QtBaseViewer of ACG
* added separate compile unit for Qt functions similar to the one in
Openflipper
* made classes which require Opengl forward declarations inside
QtBaseViewer.hh
*added includes for forward declared classes for remaining QtWidgets of
ACG
parent e8f64be6
This diff is collapsed.
......@@ -61,9 +61,11 @@
//== INCLUDES =================================================================
#include "../GL/GLState.hh"
#include "../Scenegraph/SceneGraph.hh"
#include "../Scenegraph/DrawModes.hh"
#include "../Config/ACGDefines.hh"
#include "../Math/VectorT.hh"
#include "../Math/GLMatrixT.hh"
#include "../Scenegraph/PickTarget.hh"
#include <QGLFormat>
#include <QBoxLayout>
......@@ -98,12 +100,16 @@ class QImage;
class QSocketNotifier;
class QGraphicsWidget;
class QGraphicsGridLayout;
class QGLFormat;
class QGLWidget;
//== NAMESPACES ===============================================================
namespace ACG {
class GLState;
namespace SceneGraph {
class BaseNode;
}
namespace QtWidgets {
......@@ -116,7 +122,6 @@ class QtGLGraphicsView;
class QtSceneGraphDialog;
class QtShiftPopupMenu;
//== CLASS DEFINITION =========================================================
......@@ -246,11 +251,9 @@ public:
/** Set background color.
Sets the OpenGL clear color to (_c.red(), _c.green(), _c.blue(), 0).
*/
void backgroundColor(const Vec4f& _color) {
glstate_->set_clear_color(_color); updateGL();
}
void backgroundColor(const Vec4f& _color);
/// get background color
Vec4f backgroundColor() { return glstate_->clear_color(); }
Vec4f backgroundColor();
/** Lock update of display.
......@@ -764,6 +767,8 @@ private:
// helper called by drawScene() when stereo viewing is active.
void drawScene_stereo();
// helper to check openGL support
bool hasOpenGL();
// updates popup menu with the available draw modes
void updatePopupMenu();
......
......@@ -62,6 +62,9 @@
#include "QtGLGraphicsScene.hh"
#include "QtGLGraphicsView.hh"
#include "../GL/GLState.hh"
#include "../Scenegraph/SceneGraph.hh"
//== NAMESPACES ===============================================================
namespace ACG {
......
......@@ -62,6 +62,8 @@
#include <QStatusBar>
#include <QToolButton>
#include "../GL/GLState.hh"
#include "mono.xpm"
#include "stereo.xpm"
......
......@@ -63,6 +63,8 @@
#include "QtGLGraphicsView.hh"
#include <QHostInfo>
#include "../GL/GLState.hh"
//== NAMESPACES ===============================================================
namespace ACG {
......
This diff is collapsed.
......@@ -65,6 +65,8 @@
#include <QInputDialog>
#include <QStatusBar>
#include "../GL/GLState.hh"
#ifdef max
# undef max
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment