fixed index buffer count bug

This commit is contained in:
Lauchmelder 2021-12-27 15:40:51 +01:00
parent 967bf6b161
commit 5fd9e9d6ee

View file

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