IDirect3DRMFrame::SetSceneBackgroundDepth

Specifies a background-depth buffer for a scene.

HRESULT SetSceneBackgroundDepth(
LPDIRECTDRAWSURFACE lpImage
);

Parameters

lpImage

Address of a DirectDraw surface that will store the new background depth for the scene.

Return Values

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

Remarks

The image must have a depth of 16. If the image and viewport sizes are different, the image is scaled first. For best performance when animating the background-depth buffer, the image should be the same size as the viewport. This enables the depth buffer to be updated directly from the image memory without incurring extra overhead.

See Also

IDirect3DRMFrame::GetSceneBackgroundDepth