DirectX SDK

Direct3DX Utility Library Interfaces and Object Types

The Direct3DX utility library defines the following COM interfaces:

ID3DXContext The root interface which is used for state configuration, texture creation, and display updating.
ID3DXMatrixStack A helper interface that is used for implementing a scene hierarchy.
ID3DXSimpleShape A vertex-buffer interface that is used for draw primitive-based rendering.

The most fundamental object in the Direct3DX utility library is the D3DXDevice object. This object cannot be created (unlike the D3DXContext and D3DXMatrixStack objects) and does not expose any interfaces. It is simply referred to as an index into the list of Direct3DX Devices that are available on the system. The D3DXDevice object represents the driver that does the rendering and the capabilities of that driver.

For more information, see Direct3DX Devices.

The ID3DXContext interface represents the D3DXContext object. You can create multiple D3DXContext objects for each D3DXDevice object.

The D3DXDevice object encapsulates the following objects:

Creating the D3DXContext object creates all of the preceding objects for your game or application. A pointer to the interface that implements each of these encapsulated objects can be obtained from the context object by calling the following methods:

You can think of a D3DXContext object as a rendering context on a particular D3DXDevice object.

The ID3DXMatrixStack interface represents the D3DXMatrixStack object. D3DXMatrixStack is a matrix stack object that implements the matrix stack to enable the manipulation of transformation hierarchies. The ID3DXMatrixStack interface completely defines this object.

The ID3DXSimpleShape interface is exposed through all of the shape objects:

For information on the shape objects provided by Direct3DX, see the following topics:

A shape object contains the shape data (the vertex and the index information) that defines the shape. By using the ID3DXSimpleShape interface, you can either draw the shape, or obtain vertex and index information directly from the shape object.