Preparing to Use a Material

The following steps are required, in order, to create and prepare a material for rendering.

To prepare a material for rendering

  1. Create a material object.

    When you create a material object, Direct3D allocates internal data structures that will contain information about the material. For more information, see Creating a Material.

  2. Set the material properties.

    By setting material properties, you define how the material will reflect light in a scene, and how material colors will be used when Direct3D is using ramp emulation. For more information, see Setting Material Properties.

  3. Retrieve the material handle.

    Retrieving the material object's handle creates an association between the material and a Direct3D device. For more information, see Retrieving Material Handles.

  4. Select the material.

    Selecting the material causes Direct3D to rasterize polygons with that material's reflection properties, and is the final step you must take to prepare the material for rendering. For more information, see Selecting a Material for Rendering.