summaryrefslogtreecommitdiff
path: root/src/export_png.cc
diff options
context:
space:
mode:
authordon bright <hugh.m.bright@gmail.com>2013-03-03 18:20:18 (GMT)
committerdon bright <hugh.m.bright@gmail.com>2013-03-03 18:20:18 (GMT)
commitf190b9605c11d9b49102046f578a18de2f8d84b1 (patch)
treed407b71a412a64a862a5c554ceb21123a3e6b65c /src/export_png.cc
parent9f5c6133bf55713ada6133d7beffbeddd86ffecf (diff)
add imgsize cmdline parameter for png output
Diffstat (limited to 'src/export_png.cc')
-rw-r--r--src/export_png.cc8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/export_png.cc b/src/export_png.cc
index f185e3d..33fb85b 100644
--- a/src/export_png.cc
+++ b/src/export_png.cc
@@ -14,10 +14,8 @@
void export_png_with_cgal(CGAL_Nef_polyhedron *root_N, Camera &cam, std::ostream &output)
{
OffscreenView *glview;
- int w = RenderSettings::inst()->img_width;
- int h = RenderSettings::inst()->img_height;
try {
- glview = new OffscreenView( w, h );
+ glview = new OffscreenView( cam.pixel_width, cam.pixel_height );
} catch (int error) {
fprintf(stderr,"Can't create OpenGL OffscreenView. Code: %i.\n", error);
return;
@@ -66,10 +64,8 @@ void export_png_with_opencsg(Tree &tree, Camera &cam, std::ostream &output)
return;
}
- int w = RenderSettings::inst()->img_width;
- int h = RenderSettings::inst()->img_height;
try {
- csgInfo.glview = new OffscreenView( w, h );
+ csgInfo.glview = new OffscreenView( cam.pixel_width, cam.pixel_height );
} catch (int error) {
fprintf(stderr,"Can't create OpenGL OffscreenView. Code: %i.\n", error);
return;
contact: Jan Huwald // Impressum