Blt
Expand Minimize

SetMaterial routine

The SetMaterial function sets the material properties that devices on the system use to create the required effect during rendering.

Syntax


PFND3DDDI_SETMATERIAL SetMaterial;

__checkReturn HRESULT APIENTRY SetMaterial(
  _In_  HANDLE hDevice,
  _In_  const D3DDDIARG_SETMATERIAL *pData
)
{ ... }

Parameters

hDevice [in]

A handle to the display device (graphics context).

pData [in]

A pointer to a D3DDDIARG_SETMATERIAL structure that describes the material properties that are used for rendering.

Return value

SetMaterial returns S_OK or an appropriate error result if the material properties are not successfully set.

Remarks

Material properties detail a material's diffuse reflection, ambient reflection, light emission, and specular highlighting characteristics. The Microsoft Direct3D runtime uses the D3DDDIARG_SETMATERIAL structure to pass all of the material property information to the user-mode display driver. Material properties affect the colors that the Direct3D runtime uses to rasterize polygons that use the material. With the exception of the specular property, each of the properties is described as an RGBA color that represents how much of the red, green, and blue parts of a given type of light it reflects and an alpha blending factor (the alpha component of the RGBA color). The material's specular property is described in two parts: color and power. For more information about material properties, see the Microsoft Windows SDK documentation.

Requirements

Version

Available in Windows Vista and later versions of the Windows operating systems.

Header

D3dumddi.h (include D3dumddi.h)

See also

D3DDDIARG_SETMATERIAL
D3DDDI_DEVICEFUNCS

 

 

Send comments about this topic to Microsoft

Show:
© 2014 Microsoft