Applications use the methods of the IDirect3DMaterial3 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.
You create this interface by calling the IDirect3D3::CreateMaterial method. The IDirect3DMaterial3 interface provides identical services to its predecessor, the IDirect3DMaterial2 interface, but binds materials to the latest iteration of the Direct3DDevice interface, IDirect3DDevice3.
The methods of the IDirect3DMaterial3 interface can be organized into the following groups:
Handles | GetHandle |
Materials | GetMaterial |
SetMaterial |
The IDirect3DMaterial3 interface, like all COM interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:
IUnknown | AddRef |
QueryInterface | |
Release |
The LPDIRECT3DMATERIAL3, LPDIRECT3DMATERIAL2, and LPDIRECT3DMATERIAL types are defined as pointers to the IDirect3DMaterial3, IDirect3DMaterial2 and IDirect3DMaterial interfaces:
typedef struct IDirect3DMaterial3 *LPDIRECT3DMATERIAL3;
typedef struct IDirect3DMaterial2 *LPDIRECT3DMATERIAL2;
typedef struct IDirect3DMaterial *LPDIRECT3DMATERIAL;
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.