summaryrefslogtreecommitdiff
path: root/Runtime/Misc/Plugins.h
blob: 1230835a4bdbd62da09a5c1228c6a79a69c90ba6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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