From f54370de7e4214cb7813d26b1a39a8f6e42b7b56 Mon Sep 17 00:00:00 2001 From: hnOsmium0001 Date: Mon, 25 Apr 2022 20:22:07 -0700 Subject: Initial work on rendering sprites to screen --- source/CpuMesh.hpp | 51 --------------------------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 source/CpuMesh.hpp (limited to 'source/CpuMesh.hpp') diff --git a/source/CpuMesh.hpp b/source/CpuMesh.hpp deleted file mode 100644 index 9fcb00c..0000000 --- a/source/CpuMesh.hpp +++ /dev/null @@ -1,51 +0,0 @@ -#pragma once - -#include "Color.hpp" -#include "Mesh.hpp" -#include "PodVector.hpp" -#include "RcPtr.hpp" - -#include -#include -#include -#include - -struct StandardVertex { - float x, y, z; - float u, v; - uint8_t r, g, b, a; -}; - -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