Page 1 of 1

Aspect Ratio

Posted: Tue Jan 12, 2010 5:03 am
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();

Posted: Tue Jan 12, 2010 5:18 am
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.