This commit is contained in:
Lauchmelder 2021-12-24 15:14:15 +01:00
parent 5811d3676a
commit 988a429f16
4 changed files with 6 additions and 6 deletions

View file

@ -2,9 +2,9 @@
namespace lol
{
ElementBuffer::ElementBuffer(size_t count, unsigned int* elements, Usage usage) :
ElementBuffer::ElementBuffer(size_t count, const std::vector<unsigned int>& elements, Usage usage) :
Buffer(BufferType::ElementArray), count(count)
{
glBufferData(NATIVE(type), count * sizeof(unsigned int), elements, NATIVE(usage));
glBufferData(NATIVE(type), count * sizeof(unsigned int), elements.data(), NATIVE(usage));
}
}