IDirect3D2

Applications use the methods of the IDirect3D2 interface to create Direct3D objects and set up the environment. This section is a reference to the methods of this interface. For a conceptual overview, see IDirect3D2 interface.

The IDirect3D2 interface is obtained by calling the QueryInterface method from a DirectDraw object.

The major difference between IDirect3D2 and the IDirect3D interface is the addition of the CreateDevice method.

The methods of the IDirect3D2 interface can be organized into the following groups:

Creation CreateDevice
CreateLight
CreateMaterial
CreateViewport
Enumeration EnumDevices
FindDevice

The IDirect3D2 interface, like all COM interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:

AddRef
QueryInterface
Release

The LPDIRECT3D2 and LPDIRECT3D types are defined as pointers to the IDirect3D2 and IDirect3D interfaces:

typedef struct IDirect3D    *LPDIRECT3D;
typedef struct IDirect3D2   *LPDIRECT3D2;