From 60ccc62f4934e44ad5b905fdbcf458302b8d8a09 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Fri, 3 Jun 2022 23:26:44 -0700 Subject: Changeset: 63 [WIP] Rename directories --- source/Game/Mesh.hpp | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 source/Game/Mesh.hpp (limited to 'source/Game/Mesh.hpp') 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 +#include +#include +#include + +struct StandardVertexExtra { + float u, v; + uint8_t r, g, b, a; +}; + +class StandardCpuMeshData { +public: + PodVector vertPositions; + PodVector vertExtra; + PodVector index; + size_t vertexCount; + size_t triangleCount; +}; + +class StandardCpuMesh { +// private: +// StandardCpuMeshData* mData = nullptr; +// RcPtr 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); +}; -- cgit v1.2.3-70-g09d2