IDirect3DRM2::CreateDeviceFromSurface
Creates a Direct3DRMDevice2 Windows device for rendering from the specified DirectDraw surfaces. An IDirect3DRMDevice2 interface 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.
HRESULT CreateDeviceFromSurface(
LPGUID lpGUID,
LPDIRECTDRAW lpDD,
LPDIRECTDRAWSURFACE lpDDSBack,
LPDIRECT3DRMDEVICE2 * lplpD3DRMDevice
);
Parameters
lpGUID
Address of the globally unique identifier (GUID) used as the required device driver. If this parameter is NULL, the default device driver is used.
lpDD
Address of the DirectDraw object that is the source of the DirectDraw surface.
lpDDSBack
Address of the DirectDrawSurface object that represents the back buffer.
lplpD3DRMDevice
Address that will be filled with a pointer to an IDirect3DRMDevice2 interface if the call succeeds.
Return Values
Returns D3DRM_OK if successful, or an error otherwise. For a list of possible return codes, see Direct3D Retained-Mode Return Values.