summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2013-03-03 17:41:37 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2013-03-03 17:41:37 (GMT)
commitbacaa2b1b916f7672e2b971337232caef9cb22a2 (patch)
tree600980169762db7de33d29767fc0b7470000aeec /src
parent2b2dc7a078e92193f0d27d901d3a1b4af9f5a1d9 (diff)
fix bugs in testing
Diffstat (limited to 'src')
-rw-r--r--src/GLView.cc6
-rw-r--r--src/export_png.cc1
2 files changed, 5 insertions, 2 deletions
diff --git a/src/GLView.cc b/src/GLView.cc
index 77c3375..6598ed5 100644
--- a/src/GLView.cc
+++ b/src/GLView.cc
@@ -94,9 +94,11 @@ void GLView::setCamera( Camera &cam )
void GLView::paintGL()
{
- if (cam.type == Camera::NONE) return;
- else if (cam.type == Camera::GIMBAL) gimbalCamPaintGL();
+ if (cam.type == Camera::GIMBAL) gimbalCamPaintGL();
else if (cam.type == Camera::VECTOR) vectorCamPaintGL();
+ else if (cam.type == Camera::NONE) {
+ fprintf(stderr,"paintGL with null camera\n");
+ }
}
#ifdef ENABLE_OPENCSG
diff --git a/src/export_png.cc b/src/export_png.cc
index a8c7620..f185e3d 100644
--- a/src/export_png.cc
+++ b/src/export_png.cc
@@ -78,6 +78,7 @@ void export_png_with_opencsg(Tree &tree, Camera &cam, std::ostream &output)
OpenCSGRenderer opencsgRenderer(csgInfo.root_chain, csgInfo.highlights_chain, csgInfo.background_chain, csgInfo.glview->shaderinfo);
if (cam.type == Camera::NONE) {
+ cam.type = Camera::VECTOR;
cam.center << 0,0,0;
double radius = 1.0;
if (csgInfo.root_chain) {
contact: Jan Huwald // Impressum