Platform SDK: DirectX

D3DSHADEMODE

The D3DSHADEMODE enumerated type describes the supported shading mode for the D3DRENDERSTATE_SHADEMODE render state in the D3DRENDERSTATETYPE enumerated type.

typedef enum _D3DSHADEMODE { 
    D3DSHADE_FLAT         = 1, 
    D3DSHADE_GOURAUD      = 2, 
    D3DSHADE_PHONG        = 3, 
    D3DSHADE_FORCE_DWORD  = 0x7fffffff, 
} D3DSHADEMODE; 
D3DSHADE_FLAT
Flat shading mode. The color and specular component of the first vertex in the triangle are used to determine the color and specular component of the face. These colors remain constant across the triangle; that is, they are not interpolated.
D3DSHADE_GOURAUD
Gouraud shading mode. The color and specular components of the face are determined by a linear interpolation between all three of the triangle's vertices.
D3DSHADE_PHONG
Not currently supported.
D3DSHADE_FORCE_DWORD
Forces this enumeration to compile to 32 bits in size. This value is not used.

Requirements

  Windows NT/2000: Requires Windows NT 4.0 SP3 or later.
  Windows 95/98: Requires Windows 95 or later. Available as a redistributable for Windows 95.
  Version: Requires DirectX 2.0 or later.
  Header: Declared in d3dtypes.h.

See Also

D3DRENDERSTATETYPE