BugFix: CameraProjectionMode #PB_Camera_Orthographic Aspect

Found an issue in the documentation ? Please report it here !

Moderator: Documentation Editors

Henry00
User
User
Posts: 88
Joined: Thu Jul 12, 2012 7:00 pm
Location: Germany
Contact:

BugFix: CameraProjectionMode #PB_Camera_Orthographic Aspect

Post 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!
Fred
Administrator
Administrator
Posts: 18153
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: BugFix: CameraProjectionMode #PB_Camera_Orthographic Asp

Post by Fred »

Could you post a small sample showing the issue ?
User avatar
Comtois
Addict
Addict
Posts: 1431
Joined: Tue Aug 19, 2003 11:36 am
Location: Doubs - France

Re: BugFix: CameraProjectionMode #PB_Camera_Orthographic Asp

Post 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])
Please correct my english
http://purebasic.developpez.com/
Post Reply