diff options
author | rtk0c <[email protected]> | 2022-06-03 23:26:44 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-06-03 23:26:44 -0700 |
commit | 60ccc62f4934e44ad5b905fdbcf458302b8d8a09 (patch) | |
tree | 02ec83cc8387abfd08bd5ee7ea4e8115f1bfb8d0 /source/Game/Mesh.hpp | |
parent | c2ef7737536bf1f8c81fcfae95c0183b21c9753f (diff) |
Changeset: 63 [WIP] Rename directories
Diffstat (limited to 'source/Game/Mesh.hpp')
-rw-r--r-- | source/Game/Mesh.hpp | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/source/Game/Mesh.hpp b/source/Game/Mesh.hpp new file mode 100644 index 0000000..f86fd55 --- /dev/null +++ b/source/Game/Mesh.hpp @@ -0,0 +1,45 @@ +#pragma once + +#include "Color.hpp" +#include "VertexIndex.hpp" +#include "PodVector.hpp" +#include "RcPtr.hpp" + +#include <cstddef> +#include <cstdint> +#include <glm/glm.hpp> +#include <memory> + +struct StandardVertexExtra { + float u, v; + uint8_t r, g, b, a; +}; + +class StandardCpuMeshData { +public: + PodVector<glm::vec3> vertPositions; + PodVector<StandardVertexExtra> vertExtra; + PodVector<uint32_t> index; + size_t vertexCount; + size_t triangleCount; +}; + +class StandardCpuMesh { +// private: +// StandardCpuMeshData* mData = nullptr; +// RcPtr<GpuMesh> mGpuMesh; + +// public: +// StandardCpuMesh(); +// ~StandardCpuMesh(); + +// GpuVertexBuffer* GetPosBuffer() const; +// GpuVertexBuffer* GetExtraBuffer() const; +// GpuMesh* GetGpuMesh() const { return mGpuMesh.Get(); } + +// void CreateCpuData(); +// bool UpdatePositions(glm::vec3* pos, size_t count, size_t startVertIndex); +// bool UpdateColors(RgbaColor* color, size_t count, size_t starVertIndex); +// bool UpdateNormals(glm::vec2* normals, size_t count, size_t startVertIndex); +// bool UpdateIndices(uint32_t* indices, size_t count, size_t startVertIndex); +}; |