|
|
|
#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);
|
|
}
|
|
}
|
|
|