diff options
author | rtk0c <[email protected]> | 2022-04-10 23:00:36 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2022-04-10 23:00:36 -0700 |
commit | 17d5b091c9b2901ac96f5eee0da6af07228ae690 (patch) | |
tree | c210229c4bee1d3f56a64eacf1f976dfd8f971a7 /source/Mesh.cpp | |
parent | a849c199d970e153580c312a24cfdfa099bc7b69 (diff) |
Changeset: 5 Add shader and corresponding editor components
Diffstat (limited to 'source/Mesh.cpp')
-rw-r--r-- | source/Mesh.cpp | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/source/Mesh.cpp b/source/Mesh.cpp index 385ef55..3622d42 100644 --- a/source/Mesh.cpp +++ b/source/Mesh.cpp @@ -2,67 +2,6 @@ #include <algorithm> -int Tags::SizeOf(VertexElementType type) { - switch (type) { - case VET_Float1: - return sizeof(float); - case VET_Float2: - return sizeof(float) * 2; - case VET_Float3: - return sizeof(float) * 3; - case VET_Float4: - return sizeof(float) * 4; - case VET_Double1: - return sizeof(double); - case VET_Double2: - return sizeof(double) * 2; - case VET_Double3: - return sizeof(double) * 3; - case VET_Double4: - return sizeof(double) * 4; - case VET_Short2: - case VET_Short2Norm: - case VET_Ushort2: - case VET_Ushort2Norm: - return sizeof(short) * 2; - case VET_Short4: - case VET_Short4Norm: - case VET_Ushort4: - case VET_Ushort4Norm: - return sizeof(short) * 4; - case VET_Int1: - case VET_Uint1: - return sizeof(int); - case VET_Int2: - case VET_Uint2: - return sizeof(int) * 2; - case VET_Int3: - case VET_Uint3: - return sizeof(int) * 3; - case VET_Int4: - case VET_Uint4: - return sizeof(int) * 4; - case VET_Byte4: - case VET_Byte4Norm: - case VET_Ubyte4: - case VET_Ubyte4Norm: - return sizeof(char) * 4; - } - return 0; -} - -bool Tags::IsNormalized(VertexElementType type) { - return type >= VET_NORM_BEGIN && type <= VET_NORM_END; -} - -int Tags::SizeOf(IndexType type) { - switch (type) { - case IT_16Bit: return sizeof(uint16_t); - case IT_32Bit: return sizeof(uint32_t); - } - return 0; -} - GpuVertexBuffer::GpuVertexBuffer() { glGenBuffers(1, &handle); } |