D3DRMLOADOPTIONS

typedef DWORD D3DRMLOADOPTIONS;

#define D3DRMLOAD_FROMFILE 0x00L

#define D3DRMLOAD_FROMRESOURCE 0x01L

#define D3DRMLOAD_FROMMEMORY 0x02L

#define D3DRMLOAD_FROMSTREAM 0x03L

#define D3DRMLOAD_BYNAME 0x10L

#define D3DRMLOAD_BYPOSITION 0x20L

#define D3DRMLOAD_BYGUID 0x30L

#define D3DRMLOAD_FIRST 0x40L

#define D3DRMLOAD_INSTANCEBYREFERENCE 0x100L

#define D3DRMLOAD_INSTANCEBYCOPYING 0x200L

Defines options for the IDirect3DRM::Load, IDirect3DRMAnimationSet::Load, IDirect3DRMFrame::Load, and IDirect3DRMMeshBuilder::Load methods. These options modify how the object is loaded.

Source flags

D3DRMLOAD_FROMFILE

Load from a file. This is the default setting.

D3DRMLOAD_FROMRESOURCE

Load from a resource. If this flag is specified, the lpvObjSource parameter of the calling Load method must point to a D3DRMLOADRESOURCE structure.

D3DRMLOAD_FROMMEMORY

Load from memory. If this flag is specified, the lpvObjSource parameter of the calling Load method must point to a D3DRMLOADMEMORY structure.

D3DRMLOAD_FROMSTREAM

Load from a stream.

Identifier flags

D3DRMLOAD_BYNAME

Load using a specified name.

D3DRMLOAD_BYPOSITION

Load using a specified zero-based position (that is, the nth object in the file).

D3DRMLOAD_BYGUID

Load using a specified globally unique identifier (GUID).

D3DRMLOAD_FIRST

Load the first top-level object of the given type (for example, a mesh if the application calls IDirect3DRMMeshBuilder::Load). This is the default setting.

Instance flags

D3DRMLOAD_INSTANCEBYREFERENCE

Check whether an object already exists with the same name as specified and, if so, use an instance of that object instead of creating a new one.

D3DRMLOAD_INSTANCEBYCOPYING

Check whether an object already exists with the same name as specified and, if so, copy that object.

Each of the Load methods uses an lpvObjSource parameter to specify the source of the object and an lpvObjID parameter to identify the object. The system interprets the contents of the lpvObjSource parameter based on the choice of source flags, and it interprets the contents of the lpvObjID parameter based on the choice of identifier flags.

The instance flags do not change the interpretation of any of the parameters. By using the D3DRMLOAD_INSTANCEBYREFERENCE flag, it is possible for an application to load the same file twice without creating any new objects. If an object does not have a name, setting the D3DRMLOAD_INSTANCEBYREFERENCE flag has the same effect as setting the D3DRMLOAD_INSTANCEBYCOPYING flag; the loader creates each unnamed object as a new one, even if some of the objects are identical.