Applications use the methods of the IDirect3DViewport3 interface to retrieve and set the properties of viewports. This section is a reference to the methods of this interface. For a conceptual overview, see Viewports and Clipping.
The IDirect3DViewport3 interface offers the same services as the IDirect3DViewport2 interface, but adds the Clear2 method, which simultaneously clears the viewport, depth-buffer, and stencil buffer.
You create the IDirect3DViewport3 interface by calling the IDirect3D3::CreateViewport method.
The methods of the IDirect3DViewport3 interface can be organized into the following groups:
Backgrounds | GetBackground |
GetBackgroundDepth | |
GetBackgroundDepth2 | |
SetBackground | |
SetBackgroundDepth | |
SetBackgroundDepth2 | |
Lights | AddLight |
DeleteLight | |
LightElements | |
NextLight | |
Materials and viewports | Clear |
Clear2 | |
GetViewport | |
GetViewport2 | |
SetViewport | |
SetViewport2 | |
Miscellaneous | Initialize |
Transformation | TransformVertices |
The IDirect3DViewport3 interface, like all COM interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:
IUnknown | AddRef |
QueryInterface | |
Release |
The LPDIRECT3DVIEWPORT3, LPDIRECT3DVIEWPORT2 and LPDIRECT3DVIEWPORT types are defined as pointers to the IDirect3DViewport3, IDirect3DViewport2, and IDirect3DViewport interfaces:
typedef struct IDirect3DViewport3 *LPDIRECT3DVIEWPORT3;
typedef struct IDirect3DViewport2 *LPDIRECT3DVIEWPORT2;
typedef struct IDirect3DViewport *LPDIRECT3DVIEWPORT;
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
Header: Declared in d3d.h.
Import Library: Use ddraw.lib.