lol/src/buffers/ElementBuffer.cpp

10 lines
304 B
C++
Raw Normal View History

2021-12-24 14:20:53 +01:00
#include <lol/buffers/ElementBuffer.hpp>
namespace lol
{
2021-12-27 15:40:51 +01:00
ElementBuffer::ElementBuffer(const std::vector<unsigned int>& elements, Usage usage) :
Buffer(BufferType::ElementArray), count(elements.size())
2021-12-24 14:20:53 +01:00
{
2021-12-24 15:14:15 +01:00
glBufferData(NATIVE(type), count * sizeof(unsigned int), elements.data(), NATIVE(usage));
2021-12-24 14:20:53 +01:00
}
}