ENABLE_THUMBNAIL_GENERATOR -> Use orthographic camera when rendering thumbnails
This commit is contained in:
parent
418634a677
commit
bf8fcabb29
2 changed files with 2 additions and 1 deletions
|
@ -26,7 +26,7 @@ namespace GUI {
|
|||
const double Camera::DefaultDistance = 1000.0;
|
||||
#if ENABLE_THUMBNAIL_GENERATOR
|
||||
const double Camera::DefaultZoomToBoxMarginFactor = 1.0;
|
||||
const double Camera::DefaultZoomToVolumesMarginFactor = 1.1;
|
||||
const double Camera::DefaultZoomToVolumesMarginFactor = 1.0;
|
||||
#endif // ENABLE_THUMBNAIL_GENERATOR
|
||||
double Camera::FrustrumMinZRange = 50.0;
|
||||
double Camera::FrustrumMinNearZ = 100.0;
|
||||
|
|
|
@ -3627,6 +3627,7 @@ static void render_volumes_in_thumbnail(const GLVolumePtrs& volumes, ThumbnailDa
|
|||
}
|
||||
|
||||
Camera camera;
|
||||
camera.set_type(Camera::Ortho);
|
||||
camera.zoom_to_volumes(visible_volumes, thumbnail_data.width, thumbnail_data.height);
|
||||
camera.apply_viewport(0, 0, thumbnail_data.width, thumbnail_data.height);
|
||||
camera.apply_view_matrix();
|
||||
|
|
Loading…
Reference in a new issue