blob: f86fd55a5629c7e6de960bec6b99f8cc8b0c01f8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
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);
};
|