Freigeben über


D3DMMATERIALCOLORSOURCE (Windows CE 5.0)

Send Feedback

This enumeration provides values that describe material colors for render states.

typedef enum _D3DMMATERIALCOLORSOURCE {  D3DMMCS_MATERIAL    = 0,  D3DMMCS_COLOR1      = 1,  D3DMMCS_COLOR2      = 2,  D3DMMCS_FORCE_ULONG = 0x7fffffff,} D3DMMATERIALCOLORSOURCE;

Elements

  • D3DMMCS_MATERIAL
    Indicates that the material color is taken from the current material.
  • D3DMMCS_COLOR1
    Indicates that the material color is taken from the vertex's diffuse color.
  • D3DMMCS_COLOR2
    Indicates that the material color is taken from the vertex's specular color.
  • D3DMMCS_FORCE_ULONG
    Forces the compiler to interpret the enumeration as a ULONG value. This value is not used directly in Direct3D Mobile programming.

Remarks

The following list shows render states that specify the color source for lighting calculations. For more information, see D3DMRENDERSTATETYPE.

  • D3DMRS_DIFFUSEMATERIALSOURCE
  • D3DMRS_SPECULARMATERIALSOURCE
  • D3DMRS_AMBIENTMATERIALSOURCE

If a material color source is specified for one of these render state but the FVF for a vertex does not contain a flag corresponding to that color source, then the corresponding value for the material is used instead.

For example, if D3DMRS_AMBIENTMATERIALSOURCE is set to D3DMMCS_COLOR1, but D3DMFVF_DIFFUSE does not exist in the vertex FVF, D3DMMATERIAL.Ambient is used instead.

Requirements

OS Versions: Windows CE 5.0 and later.
Header: D3dmtypes.h.

See Also

Direct3D Mobile Enumerations | D3DMRENDERSTATETYPE

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.