Native Plugins
Environment Setup
The instructions here are tailored for Visual Studio 2017 onwards, for C/C++ development using the SDK library. There may be some differences in earlier versions of Visual Studio (specifically around project generation). There is also an example CMake script, which can be used as a convenient alternative to manual Visual Studio project setup, if desired.
Start a new DLL project

Open the Configuration Manager
Edit the Active Solution Platforms
Remove the x86 platform
Open the project properties

Add C++ Include directory for installed SDK
e.g. C:\Virtalis\Visionary Render 2.1\data\vrtreesdk\include
or C:\Virtalis\GeoVisionary 3.1.1\data\vrtreesdk\include

Add Additional Library Directory for installed SDK
e.g. C:\Virtalis\Visionary Render 2.1\data\vrtreesdk\lib\x64
or C:\Virtalis\GeoVisionary 3.1.1\data\vrtreesdk\lib\x64
Add vrtree-linker.lib
For Debug configuration:
Debug\vrtree-linker.lib
For Release configuration:
Release\vrtree-linker.lib

Add a cpp file (e.g. main.cpp)
CMake
For CMake users, this project setup can be automated with the following:
# Set the minimum required version of CMake for this project and update the policy settings.
cmake_minimum_required(VERSION 2.8.11)
# Store the path to the VRTree SDK in the VRTREE_SDK_DIR variable.
set(VRTREE_SDK_DIR "" CACHE STRING "Location of the VRTree SDK")
# Set the name of this project and store it in the PROJECT_NAME variable.
project(my_plugin)
# Search the VRTree SDK for include files and libraries.
include_directories(${VRTREE_SDK_DIR}/include)
link_directories(${VRTREE_SDK_DIR}/lib/x64)
# Add a library using the specified source files.
add_library(my_plugin SHARED main.cpp)
# Add the vrtree-linker library as a dependency.
target_link_libraries(my_plugin vrtree-linker)
For further information, see the CMake Reference Documentation.
Plugin Interface
A native plugin requires a minimum set of entry points in order to be loadable by the plugin manager:
- A
VRPGetAPIVersionProccalledVRPGetAPIVersionMajor- This should return the current plugin API major version (currently 1)
- A
VRPGetAPIVersionProccalledVRPGetAPIVersionMinor- This should return the current plugin API minor version (currently 1)
- A
VRPInitProccalledVRPInit - A
VRPNameProccalledVRPName - A
VRPVersionProccalledVRPVersion - (optionally) A
VRPCleanupProccalledVRPCleanup
All of these exports should use the cdecl calling convention.