Applications use the IDirect3DRMUserVisual interface to initialize Direct3DRMUserVisual objects. Note that this initialization is not necessary if the application uses the IDirect3DRM3::CreateUserVisual method; it is required only if the application uses the IDirect3DRM3::CreateObject method to create the user-visual object. An application that calls IDirect3DRM3::CreateObject then calls the IDirect3DRMUserVisual::Init method to initialize the object.
User-visual objects are application-defined data that an application can add to a scene and then render, typically by using a customized rendering module. For example, an application could add sound as a user-visual object in a scene, and then render the sound during playback. If an application changes the render state during the D3DRMUSERVISUALCALLBACK callback function it should also restore the render state before that function returns.
The IDirect3DRMUserVisual interface supports the Init method.
The IDirect3DRMUserVisual interface, like all Component Object Model (COM) interfaces, inherits the IUnknown interface methods. The IUnknown interface supports the following three methods:
AddRef |
QueryInterface |
Release |
In addition, the IDirect3DRMUserVisual interface inherits the following methods from the IDirect3DRMObject interface:
AddDestroyCallback |
Clone |
DeleteDestroyCallback |
GetAppData |
GetClassName |
GetName |
SetAppData |
SetName |
The Direct3DRMUserVisual object is obtained by using the IDirect3DRM3::CreateUserVisual method.
Initializes a Direct3DRMUserVisual object.
Syntax
HRESULT Init(
D3DRMUSERVISUALCALLBACK d3drmUVProc,
void *lpArg
);
Parameters
- d3drmUVProc
- Application-defined D3DRMUSERVISUALCALLBACK callback function.
- lpArg
- Application-defined data to be passed to the callback function.
Return Value
Returns D3DRM_OK if successful, or an error otherwise. For a list of possible errors, see Direct3D Retained Mode Return Values.
Remarks
Applications can use the IDirect3DRM3::CreateUserVisual method to create and initialize a user-visual object at the same time. It is necessary to use IDirect3DRMUserVisual::Init only when the application has created the user-visual object by using the IDirect3DRM3::CreateObject method.
Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.