summaryrefslogtreecommitdiff
path: root/Runtime/Misc/Plugins.h
diff options
context:
space:
mode:
Diffstat (limited to 'Runtime/Misc/Plugins.h')
-rw-r--r--Runtime/Misc/Plugins.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/Runtime/Misc/Plugins.h b/Runtime/Misc/Plugins.h
new file mode 100644
index 0000000..1230835
--- /dev/null
+++ b/Runtime/Misc/Plugins.h
@@ -0,0 +1,25 @@
+#pragma once
+
+#include "Runtime/GfxDevice/GfxDevice.h"
+
+void SetAllowPlugins (bool allow);
+
+// Never change the enum values!
+// They are used in low level native plugin interface.
+enum GfxDeviceEventType {
+ kGfxDeviceEventInitialize = 0,
+ kGfxDeviceEventShutdown = 1,
+ kGfxDeviceEventBeforeReset = 2,
+ kGfxDeviceEventAfterReset = 3,
+};
+
+#if UNITY_PLUGINS_AVAILABLE
+const char* FindAndLoadUnityPlugin (const char* pluginName);
+// Used by GfxDevice
+void PluginsSetGraphicsDevice (void* device, int deviceType, GfxDeviceEventType eventType);
+void PluginsRenderMarker (int marker);
+void UnloadAllPlugins ();
+#else
+inline void PluginsSetGraphicsDevice (void* device, int deviceType, GfxDeviceEventType eventType) { }
+inline void PluginsRenderMarker (int marker) { }
+#endif