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

21 lines
289 B
C++

#include "texture.hpp"
#include <GL/glew.h>
#include <utility>
using Graphics::GL::Texture;
Texture::Texture() {
glGenTextures(1, &m_handle);
}
Texture::Texture(Texture&& o) : BufferBase(std::move(o)) {
}
Texture::~Texture() {
if(m_handle) {
glDeleteTextures(1, &m_handle);
}
}