aboutsummaryrefslogtreecommitdiff
path: root/demo/DemoApp/meshLoader.cpp
diff options
context:
space:
mode:
authorAndrew Reidmeyer <[email protected]>2017-03-15 09:28:59 -0600
committerAndrew Reidmeyer <[email protected]>2017-03-15 09:28:59 -0600
commitf5f6a899903a309f1fc93b31c0297fc7b3b5cf46 (patch)
treeed3dece338b579d5b51af494b2d543fb46c43fa3 /demo/DemoApp/meshLoader.cpp
downloadflow-1.0.0.tar.xz
flow-1.0.0.zip
Initial 1.0.0 binary releasev1.0.0
Diffstat (limited to 'demo/DemoApp/meshLoader.cpp')
-rw-r--r--demo/DemoApp/meshLoader.cpp83
1 files changed, 83 insertions, 0 deletions
diff --git a/demo/DemoApp/meshLoader.cpp b/demo/DemoApp/meshLoader.cpp
new file mode 100644
index 0000000..99e5e49
--- /dev/null
+++ b/demo/DemoApp/meshLoader.cpp
@@ -0,0 +1,83 @@
+/*
+ * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved.
+ *
+ * NVIDIA CORPORATION and its licensors retain all intellectual property
+ * and proprietary rights in and to this software, related documentation
+ * and any modifications thereto. Any use, reproduction, disclosure or
+ * distribution of this software and related documentation without an express
+ * license agreement from NVIDIA CORPORATION is strictly prohibited.
+ */
+
+#include <SDL.h>
+
+#include "loader.h"
+
+#include "mesh.h"
+#include "meshInterop.h"
+
+namespace
+{
+ ModuleLoader<16u, SDL_LoadObject, SDL_UnloadObject, SDL_LoadFunction> g_loader;
+}
+
+void loadMesh(AppGraphCtxType type)
+{
+ const char* moduleName = demoAppDLLName(type);
+
+ g_loader.loadModule(moduleName);
+}
+
+void unloadMesh()
+{
+ g_loader.unloadModule();
+}
+
+MeshContext* MeshContextCreate(const MeshContextDesc* desc)
+{
+ return g_loader.function<0>(MeshContextCreate, "MeshContextCreate", desc);
+}
+
+void MeshContextUpdate(MeshContext* context, const MeshContextDesc* desc)
+{
+ return g_loader.function<1>(MeshContextUpdate, "MeshContextUpdate", context, desc);
+}
+
+void MeshContextRelease(MeshContext* context)
+{
+ return g_loader.function<2>(MeshContextRelease, "MeshContextRelease", context);
+}
+
+MeshIndexBuffer* MeshIndexBufferCreate(MeshContext* context, MeshUint* indices, MeshUint numIndices)
+{
+ return g_loader.function<3>(MeshIndexBufferCreate, "MeshIndexBufferCreate", context, indices, numIndices);
+}
+
+void MeshIndexBufferRelease(MeshIndexBuffer* buffer)
+{
+ return g_loader.function<4>(MeshIndexBufferRelease, "MeshIndexBufferRelease", buffer);
+}
+
+MeshVertexBuffer* MeshVertexBufferCreate(MeshContext* context, MeshVertex* vertices, MeshUint numVertices)
+{
+ return g_loader.function<5>(MeshVertexBufferCreate, "MeshVertexBufferCreate", context, vertices, numVertices);
+}
+
+void MeshVertexBufferRelease(MeshVertexBuffer* buffer)
+{
+ return g_loader.function<6>(MeshVertexBufferRelease, "MeshVertexBufferRelease", buffer);
+}
+
+void MeshContextDraw(MeshContext* context, const MeshContextDrawParams* params)
+{
+ return g_loader.function<7>(MeshContextDraw, "MeshContextDraw", context, params);
+}
+
+MeshContext* MeshInteropContextCreate(AppGraphCtx* appctx)
+{
+ return g_loader.function<8>(MeshInteropContextCreate, "MeshInteropContextCreate", appctx);
+}
+
+void MeshInteropContextUpdate(MeshContext* context, AppGraphCtx* appctx)
+{
+ return g_loader.function<9>(MeshInteropContextUpdate, "MeshInteropContextUpdate", context, appctx);
+} \ No newline at end of file