Package com.ms.com.directX Previous
Previous
Microsoft Packages
Microsoft Packages
Index
Index
Next
Next

Class d3dMaterialStruc

public final class d3dMaterialStruc {
  public int dwSize;
  public float diffuseR;
  public float diffuseG;
  public float diffuseB;
  public float diffuseA;
  public float ambientR;
  public float ambientG;
  public float ambientB;
  public float ambientA;
  public float specularR;
  public float specularG;
  public float specularB;
  public float specularA;
  public float emissiveR;
  public float emissiveG;
  public float emissiveB;
  public float emissiveA;
  public float power;
  public float dvPower;
  public int hTexture;
  public int dwRampSize;
}

Specifies material properties in calls to the GetMaterial and SetMaterial methods.

See also d3dMaterial.

Fields

dwSize
Size, in bytes, of this class.
diffuseR, diffuseG, diffuseB, and diffuseA
Values specifying the diffuse color of the material.
ambientR, ambientG, ambientB, and ambientA
Values specifying the ambient color of the material.
specularR, specularG, specularB, and specularA
Values specifying the specular color of the material.
emissiveR, emissiveG, emissiveB, and emissiveA
Values specifying the emissive color of the material.
power
Value specifying the sharpness of specular highlights.
dvPower
Value specifying the sharpness of specular highlights.
hTexture
Handle of the texture map.
dwRampSize
Size of the color ramp. For the monochromatic (ramp) driver, this value must be less than or equal to 1 for materials assigned to the background; otherwise, the background is not displayed. This behavior also occurs when a texture that is assigned to the background has an associated material whose dwRampSize field is greater than 1.

The texture handle is acquired from Direct3D by loading a texture into the device. The texture handle may be used only when it has been loaded into the device.

Top© 1996 Microsoft Corporation. All rights reserved.