Page 1 of 1

BugFix: CameraProjectionMode #PB_Camera_Orthographic Aspect

Posted: Sat Apr 18, 2015 11:17 pm
by Henry00
Hello!

I have added OGRE to my PureBasic project and while I fix bugs I figured I might as well post my findings and solutions here.

In CameraProjectionMode(#PB_Camera_Orthographic) you will find that a plane of say 1024x768 and a screen of 1024x768 isn't displayed correctly:

Image

The problem is that the aspect ratio isn't correct. Simply call this after it has been set with CameraProjectionMode to fix it:

Code: Select all

(Ogre::Camera*) somecamera->setOrthoWindow(1024, 768); // this would be screen width, height.
Image

Keep up the awesome work!

Re: BugFix: CameraProjectionMode #PB_Camera_Orthographic Asp

Posted: Tue Jun 28, 2016 5:18 am
by Fred
Could you post a small sample showing the issue ?

Re: BugFix: CameraProjectionMode #PB_Camera_Orthographic Asp

Posted: Tue Jun 28, 2016 7:46 am
by Comtois
Henry00 wrote:

Code: Select all

(Ogre::Camera*) somecamera->setOrthoWindow(1024, 768); // this would be screen width, height.
Done (doc need to be updated) . setOrthoWindow() use Width and Height
CameraProjectionMode(#Camera, Mode [, Width, Height])