projects
/
laserbrain_demo
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
exhibit drawing is now handled by the Renderer
[laserbrain_demo]
/
src
/
blob_exhibit.cc
diff --git
a/src/blob_exhibit.cc
b/src/blob_exhibit.cc
index
c92ac7a
..
cd29e96
100644
(file)
--- a/
src/blob_exhibit.cc
+++ b/
src/blob_exhibit.cc
@@
-140,6
+140,12
@@
void BlobExhibit::draw() const
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
glEnable(GL_TEXTURE_GEN_S);
glEnable(GL_TEXTURE_GEN_T);
+ if(node) {
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+ glMultMatrixf(node->get_matrix()[0]);
+ }
+
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glScalef(1, -1, 1);
glMatrixMode(GL_TEXTURE);
glLoadIdentity();
glScalef(1, -1, 1);
@@
-183,13
+189,16
@@
void BlobExhibit::draw() const
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glMatrixMode(GL_MODELVIEW);
+ if(node) {
+ glPopMatrix();
+ }
glPopAttrib();
}
const AABox &BlobExhibit::get_aabox() const
{
glPopAttrib();
}
const AABox &BlobExhibit::get_aabox() const
{
- Box box = Box(priv->vol, node->get_matrix());
+ Box box = Box(priv->vol, node ? node->get_matrix() : Mat4::identity);
calc_bounding_aabox(&aabb, &box);
return aabb;
}
calc_bounding_aabox(&aabb, &box);
return aabb;
}