lol/src/Texture.cpp

20 lines
362 B
C++
Raw Normal View History

2021-12-23 03:19:13 +00:00
#include <lol/Texture.hpp>
#include <glad/glad.h>
namespace lol
{
2021-12-23 03:55:19 +00:00
UniqueTexture::UniqueTexture() :
textureID(0)
2021-12-23 03:19:13 +00:00
{
2021-12-24 13:20:53 +00:00
glGenTextures(1, &textureID);
glBindTexture(GL_TEXTURE_2D, textureID);
// glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, width, height, 0, GL_UNSIGNED_BYTE, data);
}
UniqueTexture::~UniqueTexture()
{
glDeleteTextures(1, &textureID);
2021-12-23 03:19:13 +00:00
}
}