Creates a viewport on a Direct3DRMDevice2 device with device coordinates (dwXPos, dwYPos) to (dwXPos + dwWidth, dwYPos + dwHeight).
HRESULT CreateViewport(
LPDIRECT3DRMDEVICE2 lpDev,
LPDIRECT3DRMFRAME lpCamera,
DWORD dwXPos,
DWORD dwYPos,
DWORD dwWidth,
DWORD dwHeight,
LPDIRECT3DRMVIEWPORT* lplpD3DRMViewport
);
Parameters
lpDev
Address of a Direct3DRMDevice2 device on which the viewport is to be created.
lpCamera
Address of a frame that describes the position and direction of the view.
dwXPos, dwYPos, dwWidth, and dwHeight
Position and size of the viewport, in device coordinates. The viewport size cannot be larger than the physical device or the method will fail.
lplpD3DRMViewport
Address that will be filled with a pointer to an IDirect3DRMViewport interface if the call succeeds.
Return Values
Returns D3DRM_OK if successful, or an error otherwise. If the viewport size is larger than the physical device, returns D3DRMERR_BADVALUE. For a list of possible return codes, see Direct3D Retained-Mode Return Values.
Remarks
The viewport displays objects in the scene that contains the camera, with the view direction and up vector taken from the camera. The viewport size cannot be larger than the physical device.
An IDirect3DRMDevice2 interface works with an IDirect3DDevice2 Immediate-Mode device. The IDirect3DDevice2 device supports the DrawPrimitive interface as well as execute buffers, and is required for progressive meshes and for alpha blending and sorting of transparent objects.