aboutsummaryrefslogtreecommitdiff
path: root/tools/ArtistTools/source/BlastPlugin/Render/Interface
diff options
context:
space:
mode:
authorBryan Galdrikian <[email protected]>2017-02-24 09:32:20 -0800
committerBryan Galdrikian <[email protected]>2017-02-24 09:32:20 -0800
commite1bf674c16e3c8472b29574159c789cd3f0c64e0 (patch)
tree9f0cfce09c71a2c27ff19589fcad6cd83504477c /tools/ArtistTools/source/BlastPlugin/Render/Interface
parentfirst commit (diff)
downloadblast-e1bf674c16e3c8472b29574159c789cd3f0c64e0.tar.xz
blast-e1bf674c16e3c8472b29574159c789cd3f0c64e0.zip
Updating to [email protected] and [email protected] with a new directory structure.
NvBlast folder is gone, files have been moved to top level directory. README is changed to reflect this.
Diffstat (limited to 'tools/ArtistTools/source/BlastPlugin/Render/Interface')
-rw-r--r--tools/ArtistTools/source/BlastPlugin/Render/Interface/PluginBlast.cpp69
-rw-r--r--tools/ArtistTools/source/BlastPlugin/Render/Interface/PluginBlast.h21
2 files changed, 90 insertions, 0 deletions
diff --git a/tools/ArtistTools/source/BlastPlugin/Render/Interface/PluginBlast.cpp b/tools/ArtistTools/source/BlastPlugin/Render/Interface/PluginBlast.cpp
new file mode 100644
index 0000000..3a9c9c9
--- /dev/null
+++ b/tools/ArtistTools/source/BlastPlugin/Render/Interface/PluginBlast.cpp
@@ -0,0 +1,69 @@
+#include "PluginBlast.h"
+
+PluginBlast* g_Plugin = nullptr;
+
+PluginBlast::PluginBlast()
+{
+}
+
+PluginBlast::~PluginBlast()
+{
+}
+
+typedef PluginBlast*(*Func)(void);
+
+bool PluginBlast::Create(std::string strApi)
+{
+ if ("" == strApi)
+ return false;
+
+ std::string pluginDll = "";
+ HMODULE module = NULL;
+ Func CreateFunc = NULL;
+
+#ifdef NV_ARTISTTOOLS
+ pluginDll = "RenderBlast";
+#else
+ pluginDll = "FurRender";
+#endif
+
+ pluginDll.append(strApi);
+
+#ifdef _WIN64
+ pluginDll.append(".win64");
+#else
+ pluginDll.append(".win32");
+#endif
+
+#ifdef _DEBUG
+ pluginDll.append(".d");
+#else
+#endif
+
+ pluginDll.append(".dll");
+
+ module = LoadLibraryA(pluginDll.c_str());
+ if (NULL == module)
+ return false;
+
+ CreateFunc = (Func)GetProcAddress(module, "CreateRenderBlast");
+ if (NULL == CreateFunc)
+ return false;
+
+ g_Plugin = CreateFunc();
+ return (NULL != g_Plugin);
+}
+
+PluginBlast* PluginBlast::Instance()
+{
+ return g_Plugin;
+}
+
+void PluginBlast::Destroy()
+{
+ if (nullptr == g_Plugin)
+ return;
+
+ delete g_Plugin;
+ g_Plugin = nullptr;
+}
diff --git a/tools/ArtistTools/source/BlastPlugin/Render/Interface/PluginBlast.h b/tools/ArtistTools/source/BlastPlugin/Render/Interface/PluginBlast.h
new file mode 100644
index 0000000..a67fd89
--- /dev/null
+++ b/tools/ArtistTools/source/BlastPlugin/Render/Interface/PluginBlast.h
@@ -0,0 +1,21 @@
+#pragma once
+
+#include "RenderPlugin.h"
+#include "blastplugin_global.h"
+
+class PLUGINBT_EXPORT PluginBlast
+{
+public:
+ static bool Create(std::string api);
+ static PluginBlast* Instance();
+ static void Destroy();
+
+ ~PluginBlast();
+
+ // D3D11Shaders
+ virtual bool D3D11Shaders_InitializeShadersD3D11(std::map<int, D3D11RenderShader*>& ShaderMap) = 0;
+
+protected:
+ PluginBlast();
+};
+