PDA

View Full Version : Setting Viewport size/scale?


Gibbz
02-20-2007, 06:18 AM
Im setting the viewport up using a camera of FOV 90. However when I set it up the viewport it's scaled width wise. This gives a very squashed viewport...



gw.setPos 0 0 512 512 --setup bitmap to desired res
max views redraw --redraw the view
mViewportBitmap = gw.getViewportDib() -- getviewport as bitmap

Gibbz
02-22-2007, 02:18 AM
Anyone got any ideas why the viewport gets squished?

Ive tryed setting the view matrix manually, it has the same issue....

Would It be best to capture the viewport at the current res, and attempt to scale it to the resolution I require?

Gibbz
02-27-2007, 03:53 AM
ARGH!
does anyone know how to get a square viewport and have it non distorted?
Ive tryed doing a snapshot of the current unscaled viewport and scaling down, its better, but still squished :(

ypuech
02-27-2007, 09:53 AM
Hi,

It's not possible to resize max viewport in MAXScript or with the SDK. I think one solution is to resize the bitmap result from the rendering.

CGTalk Moderation
02-27-2007, 09:53 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.