Microsoft DirectX 8.0 (C++) |
Sets the viewport parameters for the device.
HRESULT SetViewport( CONST D3DVIEWPORT8* pViewport );
If the method succeeds, the return value is D3D_OK.
D3DERR_INVALIDCALL if the pViewport parameter is invalid.
If the viewport parameters described by the D3DVIEWPORT8 structure describe a region that cannot exist within the render target surface, the method fails, returning D3DERR_INVALIDCALL.
Any call to SetViewPort between a pair of calls to IDirect3DDevice8::BeginScene and IDirect3DDevice8::EndScene must be made before any geometry is drawn.
Header: Declared in D3d8.h.
Import Library: Use D3d8.lib.