IDirect3DRM::CreateViewport

HRESULT CreateViewport(LPDIRECT3DRMDEVICE lpDev,

LPDIRECT3DRMFRAME lpCamera, DWORD dwXPos,

DWORD dwYPos, DWORD dwWidth, DWORD dwHeight,

LPDIRECT3DRMVIEWPORT* lplpD3DRMViewport);

Creates a viewport on a device with device coordinates (dwXPos, dwYPos) to (dwXPos + dwWidth, dwYPos + dwHeight).

·Returns D3DRM_OK if successful, or an error otherwise. For a list of possible return codes, see Direct3D Retained-Mode Return Values.

lpDev

Device on which the viewport is to be created.

lpCamera

Frame that describes the position and direction of the view.

dwXPos, dwYPos, dwWidth, and dwHeight

Position and size of the viewport, in device coordinates.

lplpD3DRMViewport

Address that will be filled with a pointer to an IDirect3DRMViewport interface if the call succeeds.

The viewport displays objects in the scene that contains the camera, with the view direction and up vector taken from the camera.