Platform SDK: DirectX

Direct3DDevice7.SetViewport

The Direct3DDevice7.SetViewport method sets the viewport parameters for the device.

object.SetViewport( _ 
    viewport As D3DVIEWPORT7) 

Parameters

object
Object expression that resolves to a Direct3DDevice7 object.
viewport
A D3DVIEWPORT7 type that contains the viewport parameters to be set.

Error Codes

If the method fails, an error is raised and Err.Number may be set to DDERR_INVALIDPARAMS to indicate that the viewport parameter is invalid.

Remarks

If the viewport parameters described by the D3DVIEWPORT7 type describe a region that cannot exist within the render target surface, the method will fail, returning DDERR_INVALIDPARAMS.

See Also

Direct3DDevice7.GetViewport