diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/GLView.cc | 6 | ||||
-rw-r--r-- | src/export_png.cc | 1 |
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) { |