summaryrefslogtreecommitdiff
path: root/src/ThrownTogetherRenderer.cc
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2011-10-04 19:06:40 (GMT)
committerMarius Kintel <marius@kintel.net>2011-10-04 19:06:40 (GMT)
commit799ca1d1b3f2e9142460ab3ce895a0641f54dfda (patch)
tree6c168de6d55cb92b94b0ddeb54c668bd4946c10d /src/ThrownTogetherRenderer.cc
parent9259d57659f61e9e56942bb36125f605f8f3c338 (diff)
parentf5e0f3a531b0c8806e4ebc62cd91ca31275ae481 (diff)
Merge branch 'master' into visitortests
Conflicts: src/polyset.h
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