hyporo-cpp/source/hyporo/gpu/opengl/buffer.cpp
2022-10-03 18:51:34 +05:00

28 lines
429 B
C++

#include "buffer.hpp"
namespace hpr::gpu::opengl
{
Buffer::Buffer() :
gpu::Buffer(DeviceAPI::OpenGL),
p_bufferIndex {0},
p_vertexArrayIndex {0}
{}
Buffer::~Buffer()
{}
const int Buffer::target() const
{
switch (p_type)
{
case BufferType::Vertex:
return GL_ARRAY_BUFFER;
case BufferType::Index:
return GL_ELEMENT_INDEX_BUFFER;
}
}
}