IDirect3DRMDevice2

Applications use the methods of the IDirect3DRMDevice2 and IDirect3DRMDevice interfaces to interact with the output device. While IDirect3DRMDevice, when created from the IDirect3DRM interface, works with an IDirect3DDevice Immediate-Mode device, IDirect3DRMDevice2, when created from the IDirect3DRM2 interface, or initialized by the IDirect3DRMDevice2::InitFromD3D2 or IDirect3DRMDevice2::InitFromSurface method, works with an IDirect3DDevice2 Immediate-Mode device. The IDirect3DDevice2 device supports the DrawPrimitive interface as well as execute buffers, and is required for progressive meshes and for alpha blending and sorting of transparent objects.

The IDirect3DRMDevice2::InitFromSurface method uses the IDirect3DRM2::CreateDevice method to create an IDirect3DRMDevice2 interface. The IDirect3DRMDevice2::InitFromD3D2 method uses an IDirect3D2 Immediate-Mode object and an IDirect3DDevice2 Immediate-Mode device to initialize an IDirect3DRMDevice2 Retained-Mode device.

You can still query back and forth between IDirect3DRMDevice and IDirect3DRMDevice2. The main difference is in how the underlying Immediate-Mode device is created.

IDirect3DRMDevice2 contains all the methods in IDirect3DRMDevice plus two addition ones that allow you to control transparency, IDirect3DRMDevice2::GetRenderMode and IDirect3DRMDevice2::SetRenderMode, one additional initialization method, IDirect3DRMDevice2::InitFromSurface, and two changed methods IDirect3DRMDevice2::GetDirect3DDevice2 and IDirect3DRMDevice2::InitFromD3D2 which get and initialize an IDirect3DRMDevice2 object rather than an IDirect3DRMDevice object.

This section is a reference to the methods of this interface. For a conceptual overview, see IDirect3DRMDevice, IDirect3DRMDevice2, and IDirect3DRMDeviceArray Interfaces.

The methods of the IDirect3DRMDevice2 interface can be organized into the following groups:

Buffer counts GetBufferCount
  SetBufferCount
Color models GetColorModel
Dithering GetDither
  SetDither
Initialization Init
  InitFromClipper
  InitFromD3D2
  InitFromSurface
Miscellaneous GetDirect3DDevice2
  GetHeight
  GetTrianglesDrawn
  GetViewports
  GetWidth
  GetWireframeOptions
  Update
Notifications AddUpdateCallback
  DeleteUpdateCallback
Rendering quality GetQuality
  SetQuality
Shading GetShades
  SetShades
Texture quality GetTextureQuality
  SetTextureQuality
Transparency GetRenderMode
  SetRenderMode

The IDirect3DRMDevice2 interface, like all COM interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:

AddRef

QueryInterface

Release

In addition, the IDirect3DRMDevice2 interface inherits the following methods from the IDirect3DRMObject interface:

AddDestroyCallback

Clone

DeleteDestroyCallback

GetAppData

GetClassName

GetName

SetAppData

SetName

The Direct3DRMDevice2 object is obtained by calling the IDirect3DRM2::CreateDevice method.