mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-05-13 05:57:10 +03:00
28 lines
357 B
C++
28 lines
357 B
C++
#include "Texture.hpp"
|
|
|
|
namespace glrage {
|
|
namespace gl {
|
|
|
|
Texture::Texture(GLenum target)
|
|
: m_target(target)
|
|
{
|
|
glGenTextures(1, &m_id);
|
|
}
|
|
|
|
Texture::~Texture()
|
|
{
|
|
glDeleteTextures(1, &m_id);
|
|
}
|
|
|
|
void Texture::bind()
|
|
{
|
|
glBindTexture(m_target, m_id);
|
|
}
|
|
|
|
GLenum Texture::target()
|
|
{
|
|
return m_target;
|
|
}
|
|
|
|
} // namespace gl
|
|
} // namespace glrage
|