lol/src/buffers/ElementBuffer.cpp

10 lines
308 B
C++
Raw Normal View History

2021-12-24 14:20:53 +01:00
#include <lol/buffers/ElementBuffer.hpp>
namespace lol
{
2021-12-24 15:14:15 +01:00
ElementBuffer::ElementBuffer(size_t count, const std::vector<unsigned int>& elements, Usage usage) :
2021-12-24 14:20:53 +01:00
Buffer(BufferType::ElementArray), count(count)
{
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
}
}