From e47a98793e58a5dbbe76bfed27e59408e43538e4 Mon Sep 17 00:00:00 2001 From: hnOsmium0001 Date: Fri, 8 Apr 2022 22:30:12 -0700 Subject: More work --- source/CpuMesh.hpp | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 source/CpuMesh.hpp (limited to 'source/CpuMesh.hpp') diff --git a/source/CpuMesh.hpp b/source/CpuMesh.hpp new file mode 100644 index 0000000..7c6e2c8 --- /dev/null +++ b/source/CpuMesh.hpp @@ -0,0 +1,28 @@ +#pragma once + +#include "Mesh.hpp" +#include "RcPtr.hpp" + +#include +#include + +class CpuMesh : public RefCounted { +private: + std::unique_ptr mVertexData; + std::unique_ptr mIndexData; + RcPtr mGpuMesh; + RcPtr mVertexFormat; + Tags::IndexType mIndexType; + int mVertexByteCount; + int mIndexCount; + +public: + bool IsEmpty() const; + std::byte* GetVertices() const; + int GetVertexNumBytes() const; + std::byte* GetIndices() const; + int GetIndexNumBytes() const; + + GpuMesh* SyncToGpuCreate() const; + void SyncToGpu(GpuMesh& mesh) const; +}; -- cgit v1.2.3-70-g09d2