summaryrefslogtreecommitdiff
path: root/src/ThrownTogetherRenderer.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/ThrownTogetherRenderer.cc')
-rw-r--r--src/ThrownTogetherRenderer.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/ThrownTogetherRenderer.cc b/src/ThrownTogetherRenderer.cc
index 956fc11..01c7513 100644
--- a/src/ThrownTogetherRenderer.cc
+++ b/src/ThrownTogetherRenderer.cc
@@ -28,8 +28,7 @@
#include "polyset.h"
#include "csgterm.h"
-#include <GL/glew.h> // this must be included before the GL headers
-#include <qgl.h>
+#include "system-gl.h"
ThrownTogetherRenderer::ThrownTogetherRenderer(CSGChain *root_chain,
CSGChain *highlights_chain,
@@ -61,14 +60,14 @@ void ThrownTogetherRenderer::renderCSGChain(CSGChain *chain, bool highlight,
bool fberror) const
{
glDepthFunc(GL_LEQUAL);
- QHash<QPair<PolySet*,double*>,int> polySetVisitMark;
+ QHash<QPair<PolySet*,Transform3d*>,int> polySetVisitMark;
for (size_t i = 0; i < chain->polysets.size(); i++) {
- if (polySetVisitMark[QPair<PolySet*,double*>(chain->polysets[i].get(), chain->matrices[i])]++ > 0)
+ if (polySetVisitMark[QPair<PolySet*,Transform3d*>(chain->polysets[i].get(), &chain->matrices[i])]++ > 0)
continue;
- double *m = chain->matrices[i];
+ const Transform3d &m = chain->matrices[i];
double *c = chain->colors[i];
glPushMatrix();
- glMultMatrixd(m);
+ glMultMatrixd(m.data());
int csgmode = chain->types[i] == CSGTerm::TYPE_DIFFERENCE ? PolySet::CSGMODE_DIFFERENCE : PolySet::CSGMODE_NORMAL;
if (highlight) {
chain->polysets[i]->render_surface(PolySet::COLORMODE_HIGHLIGHT, PolySet::csgmode_e(csgmode + 20), m);
contact: Jan Huwald // Impressum