Applications use the methods of the IDirect3DDevice interface to retrieve and set the capabilities of Direct3D devices. This section is a reference to the methods of these interface. For a conceptual overview, see Direct3D Devices.
The IDirect3DDevice interface supports applications that work with execute buffers. It has been extended by the IDirect3DDevice3 interface, which supports the DrawPrimitive methods.
The Direct3DDevice object is obtained by calling the QueryInterface method from a DirectDrawSurface object that was created as a 3-D–capable surface.
The methods of the IDirect3DDevice interface can be organized into the following groups.
Execute buffers | CreateExecuteBuffer |
Execute | |
Information | EnumTextureFormats |
GetCaps | |
GetDirect3D | |
GetPickRecords | |
GetStats | |
Matrices | CreateMatrix |
DeleteMatrix | |
GetMatrix | |
SetMatrix | |
Miscellaneous | Initialize |
Pick | |
SwapTextureHandles | |
Scenes | BeginScene |
EndScene | |
Viewports | AddViewport |
DeleteViewport | |
NextViewport |
The IDirect3DDevice interface, like all COM interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:
IUnknown | AddRef |
QueryInterface | |
Release |
The LPDIRECT3DDEVICE type is defined as a pointer to the IDirect3DDevice interface:
typedef struct IDirect3DDevice *LPDIRECT3DDEVICE;
Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
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.