viewport and backbuffer

Started by
1 comment, last by Michael Coles 18 years, 4 months ago
Creating IDirect3DDevice9 ,the width and height need to provide. and viewport dimension also need to set. So if the two dimension is not the same what happen? if the ratio is not the same what happen??
Advertisement
I'm not sure but I guess it will just get stretched. IIRC each viewport has the default (device-)viewmatrix, or it's own. There shouldn't be stretching if you set the correct viewmatrix. And as for sizes, I think it will just get clipped or a part of the screen remains undrawn.

This is all just logical thinking, and it doesn't hurt to try it out yourself.
You can render a viewport anywhere within/off the window. it will not get stretched by default, just clipped. You can overlap multiple viewports with no problems.

One thing to note is: make sure you clear EVERY viewport you use, including the backbuffer. (an uncleared backbuffer will make the rendered viewports look vert strange sometimes).
Michael ColesSenior Software DeveloperDigini Inc.

This topic is closed to new replies.

Advertisement