IDirect3DMaterial2

Applications use the methods of the IDirect3DMaterial2 interface to retrieve and set the properties of materials. This section is a reference to the methods of this interface. For a conceptual overview, see Materials.

The IDirect3DMaterial2 interface is an extension of the IDirect3DMaterial interface. You create this interface by calling the IDirect3D2::CreateMaterial method.

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

Handles GetHandle
Materials GetMaterial
  SetMaterial

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

AddRef
QueryInterface
Release

The LPDIRECT3DMATERIAL2 and LPDIRECT3DMATERIAL types are defined as pointers to the IDirect3DMaterial2 and IDirect3DMaterial interfaces:

typedef struct IDirect3DMaterial2 *LPDIRECT3DMATERIAL2;

typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL;