Packages
 In this topic

*Methods

 

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

 


Class Direct3d

public class Direct3d implements IDirect3d
{
  // Methods
  public Direct3dLight createLight();
  public Direct3dMaterial createMaterial();
  public Direct3dViewport createViewport();
  public void enumDevices(Id3dEnumDevicesCallback fn, IUnknown p);
  public void findDevice(D3dFindDeviceSearch ds,
        D3dFindDeviceResult hresult, D3dFindDeviceResult sresult);
  public _Guid findDeviceForColorModel(int cm, int hardware);
  public void initialize(_Guid id);
  public int systemBpp();
}

Applications use the methods of the Direct3d class to create Direct3D objects and set up the environment.

Methods

createLight

public Direct3dLight createLight();

Allocates a Direct3dLight object.

Return Value:

Returns the Direct3dLight object if successful; otherwise, returns null.

createMaterial

public Direct3dMaterial createMaterial();

Allocates a Direct3dMaterial object.

Return Value:

Returns the Direct3dMaterial object if successful; otherwise, returns null.

createViewport

public Direct3dViewport createViewport();

Creates a Direct3dViewport object. The viewport is associated with a Direct3DDevice object by using the addViewport method.

Return Value:

Returns the Direct3dViewport object if successful; otherwise, returns null.

enumDevices

public void enumDevices(Id3dEnumDevicesCallback fn, IUnknown p);

Enumerates all Microsoft® Direct3D® device drivers installed on the system.

Return Value:

No return value.

ParameterDescription
fn An interface containing a callback function that the enumeration procedure will call every time a match is found.
p Application-defined data passed to the callback function.

findDevice

public void findDevice(D3dFindDeviceSearch ds, D3dFindDeviceResult hresult,
        D3dFindDeviceResult sresult);

Searches for and returns information about devices that match the given description.

Return Value:

No return value.

ParameterDescription
ds The D3dFindDeviceSearch object that contains a description of the device(s) to search for.
hresult The D3dFindDeviceSearch object that receives the hardware device results of the search.
sresult The D3dFindDeviceResult object that receives the software device results of the search.

findDeviceForColorModel

public _Guid findDeviceForColorModel(int cm, int hardware);

Finds a device with specified color model characteristics and retrieves a description of it.

Return Value:

No return value.

ParameterDescription
cm One value of D3DCOLOR_ type, specifying the color model to locate.
hardware Set this value to 1 to specify that the device should be a hardware-only renderer; set to 0 for software only.

initialize

public void initialize(_Guid id);

Initializes the Direct3d object.

Return Value:

No return value.

ParameterDescription
id A universally unique identifier (UUID).

systemBpp

public int systemBpp();

Returns the system bits-per-pixel value.

Return Value:

Returns the bits-per-pixel.

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