Packages
 In this topic

*Methods

 

Packages   PreviousThis PackageNext
Package com.ms.directX   Previous This
Package
Next

 


Class Direct3dMaterial

public class Direct3dMaterial implements IDirect3dMaterial
{
  // Methods
  public int getHandle(Direct3dDevice dev);
  public void getMaterial(D3dMaterialDesc mat);
  public void reserve();
  public void setMaterial(D3dMaterialDesc mat);
  public void unreserve();
}

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

Note This class does not provide an initialize method. Use the Direct3d.createMaterial() method to create and initialize Direct3dMaterial objects.

Methods

getHandle

public int getHandle(Direct3dDevice dev);

Obtains the material handle for the Direct3dMaterial 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 Direct3dMaterial object.

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

getMaterial

public void getMaterial(D3dMaterialDesc mat);

Retrieves the material data for the Direct3dMaterial object.

Return Value:

No return value.

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

See Also: setMaterial

reserve

public void reserve();

Not currently implemented.

setMaterial

public void setMaterial(D3dMaterialDesc mat);

Sets the material data for the Direct3dMaterial object.

Return Value:

No return value.

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

See Also: getMaterial

unreserve

public void unreserve();

Not currently implemented.

upnrm.gif © 1998 Microsoft Corporation. All rights reserved. Terms of use.