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.
public Direct3dLight createLight();
Allocates a Direct3dLight object.
Return Value:
Returns the Direct3dLight object if successful; otherwise, returns null.
public Direct3dMaterial createMaterial();
Allocates a Direct3dMaterial object.
Return Value:
Returns the Direct3dMaterial object if successful; otherwise, returns null.
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.
public void enumDevices(Id3dEnumDevicesCallback fn, IUnknown p);
Enumerates all Microsoft® Direct3D® device drivers installed on the system.
Return Value:
No return value.
Parameter | Description |
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.
|
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.
Parameter | Description |
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.
|
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.
Parameter | Description |
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.
|
public void initialize(_Guid id);
Initializes the Direct3d object.
Return Value:
No return value.
Parameter | Description |
id
| A universally unique identifier (UUID).
|
public int systemBpp();
Returns the system bits-per-pixel value.
Return Value:
Returns the bits-per-pixel.