Introduction
Plugins permit you to extend the functionality of Visionary Render in a way that persists across different scenes. The Plugin API is an extension to the core Visionary Render scripting capabilities. It provides documentation and helper libraries for the purpose of interacting natively with the C API.
The SDK examples and helpers are written with C++ in mind, but the C API can be used by any language that is capable of invoking dynamic library functions. The one condition is that you must be able to create a binary that exports the required Plugin API functions. There are two kinds of plugin: Lua and Native.
For inspiration, see the Virtalis GitHub for some example plugins.
Lua Plugins
A Lua plugin is a script that defines a module and a few simple identifying functions. Lua plugins are loaded into the Visionary Render scripting environment. This means that any scripts running on Event nodes or in the Console can use the functions defined by the plugin. Lua plugins can be developed with a standard installation of Visionary Render - there are no external libraries required.
Native Plugins
A native plugin runs compiled code natively as part of the execution of the host application (i.e. Visionary Render). By contrast, a Lua script runs inside the Lua script engine. Native plugins benefit from faster execution so should be used for more intensive tasks.
The executable code is compiled into a dynamic link library (DLL) and loaded at runtime by the plugin manager. A native plugin must export various entry points to allow the host to identify it and permit it to access the VRTree API.