-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDLL.cpp
More file actions
47 lines (41 loc) · 1009 Bytes
/
DLL.cpp
File metadata and controls
47 lines (41 loc) · 1009 Bytes
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#if defined(WIN32)
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#endif
#include "rendererPlugin.h"
#include "pxr/imaging/hd/rendererPluginRegistry.h"
PXR_NAMESPACE_OPEN_SCOPE
#if 1
TF_REGISTRY_FUNCTION(TfType)
{
HdRendererPluginRegistry::Define<HdTinyRendererPlugin>();
}
#endif
#if defined WIN32
// The module entry point
BOOL APIENTRY DllMain(HMODULE /*hModule*/, DWORD ul_reason_for_call, LPVOID /*lpReserved*/)
{
switch (ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
HdRendererPluginRegistry::Define<HdTinyRendererPlugin>();
break;
case DLL_THREAD_ATTACH:
case DLL_THREAD_DETACH:
case DLL_PROCESS_DETACH:
break;
}
return TRUE;
}
#else
extern "C"
{
__attribute__((constructor)) static void Initializer(
int /*argc*/, char** /*argv*/, char** /*envp*/)
{
HdRendererPluginRegistry::Define<HdTinyRendererPlugin>();
}
__attribute__((destructor)) static void Finalizer() {}
}
#endif
PXR_NAMESPACE_CLOSE_SCOPE