From fbfaf2149dbd64e4775e1aac069a22d80eb13ae6 Mon Sep 17 00:00:00 2001 From: xemuth Date: Mon, 10 Aug 2020 16:21:17 +0000 Subject: [PATCH] SurfaceCtrl: Change way parallele work git-svn-id: svn://ultimatepp.org/upp/trunk@14786 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- bazaar/SurfaceCtrl/SketchupCamera.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bazaar/SurfaceCtrl/SketchupCamera.h b/bazaar/SurfaceCtrl/SketchupCamera.h index 0b4cb52ac..9768255f8 100644 --- a/bazaar/SurfaceCtrl/SketchupCamera.h +++ b/bazaar/SurfaceCtrl/SketchupCamera.h @@ -28,7 +28,8 @@ class SketchupCamera : public UOGL_Camera { return glm::perspective(glm::radians(GetFOV()),(float)( ScreenSize.cx / ScreenSize.cy),GetDrawDistanceMin(),GetDrawDisanceMax());//We calculate Projection here since multiple camera can have different FOV }else if(type == CT_ORTHOGRAPHIC){ float distance = glm::distance(focus,transform.GetPosition())* (ScreenSize.cx/ScreenSize.cy); - return glm::ortho(-distance ,distance ,-distance ,distance, 0.00001f, 10000.0f); + float distanceY = glm::distance(focus,transform.GetPosition())* (ScreenSize.cy/ScreenSize.cx); + return glm::ortho(-distance ,distance ,-distanceY ,distanceY, 0.00001f, 10000.0f); }else{ LOG("Swaping to Camera Perspective (cause of unknow type)"); return glm::perspective(glm::radians(GetFOV()),(float)( ScreenSize.cx / ScreenSize.cy),GetDrawDistanceMin(),GetDrawDisanceMax());//We calculate Projection here since multiple camera can have different FOV