External Visuals

External Visuals provide a way for you to allow custom hierarchy objects in the Microsoft® Direct3D® Retained Mode hierarchy. These are Component Object Model (COM) objects that support the IDirect3DRMExternalVisual interface (and any other interfaces they need to support). Direct3D Retained Mode treats these objects as real visual objects, allowing for custom rendering, picking, bounding-box reporting, and other behaviors. External Visuals are more powerful than the User Visual supported in earlier versions of Retained Mode, which only allowed for custom rendering by using a callback function. External Visuals provide an extension mechanism that allows any type of visual object, such as deformable meshes, to be inserted into the Retained Mode visual hierarchy.

If a transform implements both IDXTransform and IDirect3DRMExternalVisual, the transform is supported in Direct3D Retained Mode through the IDirect3DRMExternalVisual interface instead of the IDXTransform interface. Implementing the IDirect3DRMExternalVisual interface is more work (it's implemented on top of Direct3D Immediate Mode), but it allows finer control over the transform and can take advantage of Direct3D Immediate Mode features that are not supported by Retained Mode. In general, a Microsoft® DirectX® Transform author does not need to implement the IDirect3DRMExternalVisual interface, but power users might want to; for example, to incorporate their own rendering engines into a DXTransform object and use External Visuals to draw. DirectX Transform and External Visuals are not necessarily tied together, but are two pieces that together solve the complete problem of defining a model and rendering it on the screen.

The DirectX Transform header files define the D3D_OVERLOADS flag. This flag is defined in Direct3D Immediate Mode to change the behavior of some of the C++ classes used by Direct3D. C++ programmers who define D3D_OVERLOADS can use these changes to simplify code that uses Direct3D. Including DirectX Transform header files turns these changes on. These changes are defined in the "D3D_OVERLOADS" topic in the Direct3D Immediate Mode Reference, in the DirectX foundation documentation.


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.