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

Class d3dMaterial

Applications use the methods of the d3dMaterial class to retrieve and set the properties of materials.

public class d3dMaterial implements Id3dMaterial
{
  public void InternalSetObject(IUnknown lpdd);
  public IUnknown InternalGetObject();
  public void Initialize(d3d dev);
  public void SetMaterial(d3dMaterialStruc mat);
  public void GetMaterial(d3dMaterialStruc mat);
  public int GetHandle(d3dDevice dev);
  public void Reserve();
  public void Unreserve();
}

The methods can be organized into the following groups:
Color reservation Reserve
Unreserve
Materials GetMaterial
SetMaterial
Miscellaneous GetHandle
Initialize

GetHandle

public int GetHandle(d3dDevice dev);

Obtains the material handle for the d3dMaterial object. This handle is used in all Direct3D API calls where a material is to be referenced. A material can be used by only one device at a time.

If the device is destroyed, the material is disassociated from the device.

Return Value:

Returns the material handle corresponding to the d3dMaterial object.

ParameterDescription
dev The d3dDevice object in which the material is being used.


GetMaterial

public void GetMaterial(d3dMaterialStruc mat);

Retrieves the material data for the d3dMaterial object.

Return Value:

No return value.

ParameterDescription
mat A d3dMaterialStruc object that receives the current material properties.

See Also: SetMaterial


Initialize

public void Initialize(d3d dev);

Initializes the d3dMaterial object.

Return Value:

No return value.

ParameterDescription
dev The d3d object.


Reserve

public void Reserve();

Not currently implemented.


SetMaterial

public void SetMaterial(d3dMaterialStruc mat);

Sets the material data for the d3dMaterial object.

Return Value:

No return value.

ParameterDescription
mat A d3dMaterialStruc object that contains the material properties to set.

See Also: GetMaterial


Unreserve

public void Unreserve();

Not currently implemented.



Top© 1996 Microsoft Corporation. All rights reserved.