diff options
Diffstat (limited to 'demo/DemoAppD3D11/meshD3D11.h')
| -rw-r--r-- | demo/DemoAppD3D11/meshD3D11.h | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/demo/DemoAppD3D11/meshD3D11.h b/demo/DemoAppD3D11/meshD3D11.h index 86efe6b..c756d76 100644 --- a/demo/DemoAppD3D11/meshD3D11.h +++ b/demo/DemoAppD3D11/meshD3D11.h @@ -12,8 +12,35 @@ #include "../DemoApp/mesh.h" -struct MeshContextDesc +struct MeshContextDescD3D11 { ID3D11Device* device; ID3D11DeviceContext* context; -};
\ No newline at end of file +}; + +inline const MeshContextDescD3D11* cast_to_MeshContextDescD3D11(const MeshContextDesc* desc) +{ + return (const MeshContextDescD3D11*)(desc); +} + +inline MeshContextDesc* cast_from_MeshContextDescD3D11(MeshContextDescD3D11* desc) +{ + return (MeshContextDesc*)(desc); +} + +MESH_API MeshContext* MeshContextCreateD3D11(const MeshContextDesc* desc); + +MESH_API void MeshContextUpdateD3D11(MeshContext* context, const MeshContextDesc* desc); + +MESH_API void MeshContextReleaseD3D11(MeshContext* context); + + +MESH_API MeshIndexBuffer* MeshIndexBufferCreateD3D11(MeshContext* context, MeshUint* indices, MeshUint numIndices); + +MESH_API void MeshIndexBufferReleaseD3D11(MeshIndexBuffer* buffer); + +MESH_API MeshVertexBuffer* MeshVertexBufferCreateD3D11(MeshContext* context, MeshVertex* vertices, MeshUint numVertices); + +MESH_API void MeshVertexBufferReleaseD3D11(MeshVertexBuffer* buffer); + +MESH_API void MeshContextDrawD3D11(MeshContext* context, const MeshContextDrawParams* params);
\ No newline at end of file |