Microsoft DirectX 8.1 (Visual Basic) |
Sets the viewport parameters for the device.
object.SetViewport( _ Viewport As D3DVIEWPORT8)
If the method fails, an error is raised and Err.Number may be set to D3DERR_INVALIDCALL to indicate that the Viewport parameter is invalid.
If the viewport parameters described by the D3DVIEWPORT8 type describe a region that cannot exist within the render target surface, the method fails, returning D3DERR_INVALIDCALL.
For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.
Any call to SetViewPort between a pair of calls to Direct3DDevice8.BeginScene and Direct3DDevice8.EndScene must be made before any geometry is drawn.