问题我解决了= =! 不是viewport的问题,因为sdk的文档中有说 Setting a new render target will cause the viewport (see Viewports and Clipping (Direct3D 9)) to be set to the full size of the new render target.下面还有一句是 The size of the depth stencil surface must be greater than or equal to the size of the render target. 于是我创建了另一个大的texture做深度缓冲,然后SetDepthStencilSurface了一下就ok了~结贴~
不是viewport的问题,因为sdk的文档中有说
Setting a new render target will cause the viewport (see Viewports and Clipping (Direct3D 9)) to be set to the full size of the new render target.下面还有一句是
The size of the depth stencil surface must be greater than or equal to the size of the render target. 于是我创建了另一个大的texture做深度缓冲,然后SetDepthStencilSurface了一下就ok了~结贴~