summaryrefslogtreecommitdiff
path: root/src/GLView.h
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-07-30 19:29:40 (GMT)
committerMarius Kintel <marius@kintel.net>2011-07-30 19:29:40 (GMT)
commit887f7eb99ff7dfaa2f088d7e210b09b10892f19a (patch)
tree9d996d97502701630abb25e789f9c4a6b036cdd6 /src/GLView.h
parentbebf3c0ac08338112bb022087a62425b4b7d9d0d (diff)
Refactored GL rendering inspired by Giles' work on RapCad. The ultimate goal is to become independent of Qt
Diffstat (limited to 'src/GLView.h')
-rw-r--r--src/GLView.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/GLView.h b/src/GLView.h
index be21578..764b23b 100644
--- a/src/GLView.h
+++ b/src/GLView.h
@@ -12,24 +12,31 @@
class GLView : public QGLWidget
{
Q_OBJECT
+ Q_PROPERTY(bool showFaces READ showFaces WRITE setShowFaces);
+ Q_PROPERTY(bool showEdges READ showEdges WRITE setShowEdges);
Q_PROPERTY(bool showAxes READ showAxes WRITE setShowAxes);
Q_PROPERTY(bool showCrosshairs READ showCrosshairs WRITE setShowCrosshairs);
Q_PROPERTY(bool orthoMode READ orthoMode WRITE setOrthoMode);
public:
GLView(QWidget *parent = NULL);
- void setRenderFunc(void (*func)(void*), void *userdata);
+ void setRenderer(class Renderer* r);
#ifdef ENABLE_OPENCSG
bool hasOpenCSGSupport() { return this->opencsg_support; }
#endif
// Properties
+ bool showFaces() const { return this->showfaces; }
+ void setShowFaces(bool enabled) { this->showfaces = enabled; }
+ bool showEdges() const { return this->showedges; }
+ void setShowEdges(bool enabled) { this->showedges = enabled; }
bool showAxes() const { return this->showaxes; }
void setShowAxes(bool enabled) { this->showaxes = enabled; }
bool showCrosshairs() const { return this->showcrosshairs; }
void setShowCrosshairs(bool enabled) { this->showcrosshairs = enabled; }
bool orthoMode() const { return this->orthomode; }
void setOrthoMode(bool enabled) { this->orthomode = enabled; }
-
+
+public:
QLabel *statusLabel;
double object_rot_x;
double object_rot_y;
@@ -45,9 +52,10 @@ public:
#endif
private:
- void (*renderfunc)(void*);
- void *renderfunc_vp;
+ Renderer *renderer;
+ bool showfaces;
+ bool showedges;
bool showaxes;
bool showcrosshairs;
bool orthomode;
contact: Jan Huwald // Impressum