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

22 lines
347 B
C++

#include <GL/glew.h>
#include "buffer_base.hpp"
using Graphics::GL::BufferBase;
BufferBase::BufferBase(BufferBase&& o) {
m_handle = o.m_handle;
o.m_handle = 0;
}
BufferBase::operator unsigned int() const {
return m_handle;
}
bool BufferBase::check_binding(int mode) {
int binding;
glGetIntegerv(mode, &binding);
return binding == 0;
}