Aspect Ratio

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
pin3
Posts: 108
Joined: Fri Oct 06, 2006 8:50 pm
Contact:

Aspect Ratio

Post by pin3 »

Doing 2 viewports by splitting the screen into two columns what is the right aspect ratio for the 2 cameras? I tried 0.5 on both, in one it shows ok, in the other its all squashed

int ResX = 800;
int ResY = 600;
...
device->getVideoDriver()->setViewPort(core::rect<s32>(0,0,ResX/2,ResY));
device->getSceneManager()->drawAll();

...
device->getVideoDriver()>setViewPort(core::rect<s32>(ResX/2,0,ResX,ResY));
device->getSceneManager()->drawAll();
Lonesome Ducky
Competition winner
Posts: 1123
Joined: Sun Jun 10, 2007 11:14 pm

Post by Lonesome Ducky »

Looks like it should be .6 repeating to me. The aspect ratio should be width divided by height, and since you use half the screen width-wise the aspect ratio would be 400/600, or 2/3, or .6 repeating.
Post Reply