0

I set my viewport as following

D3D10_VIEWPORT vp;

vp.TopLeftX = 0;
vp.TopLeftY = 0;
vp.Width    = 320;   
vp.Height   = 320;
vp.MinDepth = 0.0f;
vp.MaxDepth = 1.0f;

mDevice -> RSSetViewports(1, &vp);

But the problem is whether I use viewport or not, I can render onto the window. And chaning vp.Width or vp.Height doesn't get any effect. What is the problem?

4

1 回答 1

0

如果您没有在程序中指定视口,DirectX 会为您创建一个视口,它的大小是您渲染窗口的客户端大小。

于 2014-04-07T01:33:14.450 回答