diff options
author | Daria Volvenkova <d.volvenkova@corp.mail.ru> | 2016-11-22 18:20:30 +0300 |
---|---|---|
committer | Daria Volvenkova <d.volvenkova@corp.mail.ru> | 2016-11-22 18:20:30 +0300 |
commit | 0f80cfd45ed7960ac42a7f8ecdc3af970775d2ff (patch) | |
tree | 630b2e01a7d41a565f932ae5be02eaa4c2ca3ee4 /drape | |
parent | b0208de8de620e39b15600a0e5467e893da1cd34 (diff) |
Triangle fan batching fixed.
Diffstat (limited to 'drape')
-rw-r--r-- | drape/batcher_helpers.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drape/batcher_helpers.cpp b/drape/batcher_helpers.cpp index e15a3840a0..1be5eda2df 100644 --- a/drape/batcher_helpers.cpp +++ b/drape/batcher_helpers.cpp @@ -529,10 +529,6 @@ void TriangleFanBatch::BatchData(ref_ptr<AttributeProvider> streams) // first vertex of cpuBuffer if the first vertex of params, second vertex is // the last vertex of previous uploaded data. We copy this data on GPU. FlushData(streams->GetBindingInfo(i), cpuBuffer.Data(), batchVertexCount + 1); - - // Move cpu buffer cursor on second element of buffer. - // On next iteration first vertex of fan will be also available - cpuBuffer.Seek(1); } uint32_t advanceCount = batchVertexCount; @@ -571,6 +567,10 @@ void TriangleFanBatch::BatchData(ref_ptr<AttributeProvider> streams) cpuBuffers.push_back(CPUBuffer(binding.GetElementSize(), (vertexCount + 2) - batchVertexCount)); CPUBuffer & cpuBuffer = cpuBuffers.back(); cpuBuffer.UploadData(rawDataPointer, 1); + + // Move cpu buffer cursor on second element of buffer. + // On next iteration first vertex of fan will be also available + cpuBuffer.Seek(1); } // advance on uploadVertexCount - 1 to copy last vertex also into next VAO with |