IDirect3DDevice9::GetViewport method (d3d9helper.h)

Retrieves the viewport parameters currently set for the device.

Syntax

HRESULT GetViewport(
  [out] D3DVIEWPORT9 *pViewport
);

Parameters

[out] pViewport

Type: D3DVIEWPORT9*

Pointer to a D3DVIEWPORT9 structure, representing the returned viewport parameters.

Return value

Type: HRESULT

If the method succeeds, the return value is D3D_OK. D3DERR_INVALIDCALL is returned if the pViewport parameter is invalid.

Remarks

Typically, methods that return state will not work on a device that is created using D3DCREATE_PUREDEVICE. This method however, will work even on a pure device.

Requirements

Requirement Value
Target Platform Windows
Header d3d9helper.h (include D3D9.h)
Library D3D9.lib

See also

IDirect3DDevice9

IDirect3DDevice9::SetViewport