diff options
author | chai <chaifix@163.com> | 2021-11-01 10:43:51 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2021-11-01 10:43:51 +0800 |
commit | 78417f6cdedfcf60c8ca437190975644e942e01f (patch) | |
tree | 5140fe969fe70083d20096b030dc9e944f82a5c3 /Runtime/Graphics/SharedVertexBuffer.h | |
parent | 8078aeed4e62c6b3aa48102554044768b402570c (diff) |
*rename SharedVertexBuffer -> DynamicVertexBuffer
Diffstat (limited to 'Runtime/Graphics/SharedVertexBuffer.h')
-rw-r--r-- | Runtime/Graphics/SharedVertexBuffer.h | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/Runtime/Graphics/SharedVertexBuffer.h b/Runtime/Graphics/SharedVertexBuffer.h deleted file mode 100644 index cc89752..0000000 --- a/Runtime/Graphics/SharedVertexBuffer.h +++ /dev/null @@ -1,54 +0,0 @@ -#pragma once -#include <vector> - -#include "../Utilities/UtilMacros.h" -#include "../Shaders/ShaderChannel.h" - -#include "OpenGL.h" -#include "GPUDataBuffer.h" -#include "DefaultVertexLayout.h" -#include "CustomVertexLayout.h" -#include "Primitive.h" - -class SharedVertexBuffer -{ -public: - SharedVertexBuffer(); - ~SharedVertexBuffer(); - - // default layout - void GetChunk(uint attrs, int maxVerts, int maxIndices, EPrimitive primitive, void **out_vb, void **out_ib); - void DrawChunk(); - - // custom layout - void GetChunk(uint sizePerVert, uint sizePerIndex, int maxVerts, int maxIndices, EPrimitive primitive, void **out_vb, void **out_ib); - void DrawChunk(CustomVertexLayout& layout); - - // common - void ReleaseChunk(int actualVerts, int actualIndices); - -private: - - void FillCustomVertexLayout(CustomVertexLayout& dst); - void FillDefaultVertexLayout(DefaultVertexLayout& dst); - - void Clean(); - - // 如果数据大小超过这个限制,用内存数据,而不是glBufferData - enum { DataBufferThreshold = 1024 }; - - GPU::DataBuffer *m_CurVB; - GPU::DataBuffer *m_CurIB; - - std::vector<byte> m_CurVBData; - std::vector<uint16> m_CurIBData; - - EPrimitive m_CurPrimitive; - - uint m_CurAttrMask; // default layout - uint m_CurStride; // default layout - - uint m_CurVertexCount; - uint m_CurIndexCount; - -}; |