diff options
Diffstat (limited to 'Runtime/Graphics/VertexBuffer.h')
-rw-r--r-- | Runtime/Graphics/VertexBuffer.h | 46 |
1 files changed, 1 insertions, 45 deletions
diff --git a/Runtime/Graphics/VertexBuffer.h b/Runtime/Graphics/VertexBuffer.h index 05aa16c..382ca39 100644 --- a/Runtime/Graphics/VertexBuffer.h +++ b/Runtime/Graphics/VertexBuffer.h @@ -10,13 +10,7 @@ #include "GPUDataBuffer.h" #include "DefaultVertexLayout.h" #include "CustomVertexLayout.h" - -enum EPrimitive -{ - Primitive_Triangle = 1, - Primitive_Line = 2, - Primitive_Point = 3, -}; +#include "Primitive.h" class VertexBuffer { @@ -40,42 +34,4 @@ private: }; -class SharedVertexBuffer -{ -public: - SharedVertexBuffer(); - ~SharedVertexBuffer(); - - void GetChunk(uint attrs, int maxVerts, int maxIndices, EPrimitive primitive, void **out_vb, void **out_ib); - void ReleaseChunk(int actualVerts, int actualIndices); - - void DrawChunk(); - -private: - - void FillVertexDataInfo(DefaultVertexLayout& dst); - - void Clean(); - - // if vertex databuffer size beyond this value, use pinned memory mapping, instead of glBufferData. - enum { DataBufferThreshold = 1024 }; - - // shared vbo and ibo - GPU::DataBuffer *m_CurVB; - GPU::DataBuffer *m_CurIB; - - // restore vbo and ibo data if not using pinned memory mapping - std::vector<byte> m_CurVBData; - std::vector<uint16> m_CurIBData; - - EPrimitive m_CurPrimitive; - - uint m_CurAttrMask; - uint m_CurStride; - - uint m_CurVertexCount; - uint m_CurIndexCount; - -}; - #endif
\ No newline at end of file |