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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
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);
}
|