nuclear-plant-sim/src/graphics/gl/render_buffer.cpp

21 lines
345 B
C++

#include "render_buffer.hpp"
#include <GL/glew.h>
#include <utility>
using Graphics::GL::RenderBuffer;
RenderBuffer::RenderBuffer() {
glGenRenderbuffers(1, &m_handle);
}
RenderBuffer::RenderBuffer(RenderBuffer&& o) : BufferBase(std::move(o)) {
}
RenderBuffer::~RenderBuffer() {
if(m_handle) {
glDeleteRenderbuffers(1, &m_handle);
}
}