blob: cf8aab332bcc8a59a0cfa53dc709389cad07ba36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
#include "drape/index_buffer.hpp"
#include "drape/index_storage.hpp"
namespace dp
{
IndexBuffer::IndexBuffer(uint32_t capacity)
: DataBuffer((uint8_t)IndexStorage::SizeOfIndex(), capacity)
{
}
void IndexBuffer::UploadData(void const * data, uint32_t size)
{
GetBuffer()->UploadData((void const *)data, size);
}
void IndexBuffer::UpdateData(void const * data, uint32_t size)
{
ASSERT_LESS_OR_EQUAL(size, GetBuffer()->GetCapacity(), ());
GetBuffer()->Seek(0);
if (size > 0)
UploadData(data, size);
}
} // namespace dp
|