diff options
author | ExMix <rahuba.youri@mapswithme.com> | 2014-02-03 12:01:15 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:11:02 +0300 |
commit | cdbbf92343d9260127f535ef8808f90ad6004cdc (patch) | |
tree | 5c9f9b731092b6e77b5e6c203d68ef747b76c7b7 /drape/vertex_array_buffer.cpp | |
parent | 0c728a8a359a3644d35fe2307c84d29845d4f701 (diff) |
[drape] cpu buffer conception
Diffstat (limited to 'drape/vertex_array_buffer.cpp')
-rw-r--r-- | drape/vertex_array_buffer.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drape/vertex_array_buffer.cpp b/drape/vertex_array_buffer.cpp index e99c6216e4..035a8bd256 100644 --- a/drape/vertex_array_buffer.cpp +++ b/drape/vertex_array_buffer.cpp @@ -60,7 +60,7 @@ void VertexArrayBuffer::Build(RefPointer<GpuProgram> program) BindBuffers(); } -RefPointer<GLBuffer> VertexArrayBuffer::GetBuffer(const BindingInfo & bindingInfo) +RefPointer<GPUBuffer> VertexArrayBuffer::GetBuffer(const BindingInfo & bindingInfo) { buffers_map_t::iterator it = m_buffers.find(bindingInfo); if (it == m_buffers.end()) @@ -108,6 +108,11 @@ uint16_t VertexArrayBuffer::GetStartIndexValue() const return m_buffers.begin()->second->GetCurrentSize(); } +bool VertexArrayBuffer::IsFilled() const +{ + return GetAvailableIndexCount() < 3 || GetAvailableVertexCount() < 3; +} + void VertexArrayBuffer::UploadIndexes(uint16_t * data, uint16_t count) { ASSERT(count <= m_indexBuffer->GetAvailableSize(), ()); |