diff options
Diffstat (limited to 'Runtime/Graphics/SharedVertexBuffer.h')
-rw-r--r-- | Runtime/Graphics/SharedVertexBuffer.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Runtime/Graphics/SharedVertexBuffer.h b/Runtime/Graphics/SharedVertexBuffer.h index 001eb2c..cc89752 100644 --- a/Runtime/Graphics/SharedVertexBuffer.h +++ b/Runtime/Graphics/SharedVertexBuffer.h @@ -18,13 +18,15 @@ public: // default layout void GetChunk(uint attrs, int maxVerts, int maxIndices, EPrimitive primitive, void **out_vb, void **out_ib); - void ReleaseChunk(int actualVerts, int actualIndices); 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); @@ -32,14 +34,12 @@ private: void Clean(); - // if vertex databuffer size beyond this value, use pinned memory mapping, instead of glBufferData. + // 如果数据大小超过这个限制,用内存数据,而不是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; |