mirror of
https://github.com/LostArtefacts/TRX.git
synced 2025-05-13 14:07:08 +03:00
37 lines
509 B
C++
37 lines
509 B
C++
![]() |
#include "Sampler.hpp"
|
||
|
|
||
|
namespace glrage {
|
||
|
namespace gl {
|
||
|
|
||
|
Sampler::Sampler()
|
||
|
{
|
||
|
glGenSamplers(1, &m_id);
|
||
|
}
|
||
|
|
||
|
Sampler::~Sampler()
|
||
|
{
|
||
|
glDeleteSamplers(1, &m_id);
|
||
|
}
|
||
|
|
||
|
void Sampler::bind()
|
||
|
{
|
||
|
}
|
||
|
|
||
|
void Sampler::bind(GLuint unit)
|
||
|
{
|
||
|
glBindSampler(unit, m_id);
|
||
|
}
|
||
|
|
||
|
void Sampler::parameteri(GLenum pname, GLint param)
|
||
|
{
|
||
|
glSamplerParameteri(m_id, pname, param);
|
||
|
}
|
||
|
|
||
|
void Sampler::parameterf(GLenum pname, GLfloat param)
|
||
|
{
|
||
|
glSamplerParameterf(m_id, pname, param);
|
||
|
}
|
||
|
|
||
|
} // namespace gl
|
||
|
} // namespace glrage
|