Microsoft DirectX 8.1 (C++)

D3DXMATERIAL

Returns material information saved in Microsoft® DirectX® .x files.

struct D3DXMATERIAL {
    D3DMATERIAL8  MatD3D;
    LPSTR         pTextureFilename;
};

Members

MatD3D
D3DMATERIAL8 structure that describes the material properties.
pTextureFilename
Pointer to a string that specifies the file name of the texture.

Remarks

The D3DXLoadMeshFromX and D3DXLoadMeshFromXof functions return an array of D3DXMATERIAL structures that specify the material color and name of the texture for each material in the mesh. The application is then required to load the texture.

The LPD3DXMATERIAL type is defined as a pointer to the D3DXMATERIAL structure.

typedef struct D3DXMATERIAL *LPD3DXMATERIAL;

Requirements

  Header: Declared in D3dx8mesh.h.

See Also

D3DXLoadMeshFromX, D3DXLoadMeshFromXof