![]() |
VR-Vantage 2.2 API Documentation
|
A typical VR-Vantage application (such as VR-Vantage Stealth) creates a DtDe, then immediately creates a DtPluginManager (DtPluginManager.h) - a class responsible for loading and initializing plug-ins.
The Plug-in Manager loads plug-ins before DtDe::initialize() is even called, because a plug-in developer often wants to affect the way a DtDe is initialized. The DtPluginManager loads each of the plug-ins in the ./plugins folder, and tries to call a global function called initDeModule(). The Plug-in Manager passes a pointer to the DtDe to initDeModule(), so that the plug-in has access to the DtDe. Therefore, the main responsibility of every plug-in developer is to implement and export (with C linkage) a global function called initDeModule().
What you actually do in your plug-in is up to you. A typical plug-in may subclass one of the key VR-Vantage classes and register the subclass with the display engine within initDeModule(). For example, the following plug-in code registers a new subclass of DtChannel (DtChannel.h) (the class that represents visual channels) with the display engine:
Once you build your plug-in, place it in the ./plugins folder, so that DtPluginManager can find it.