Support gfx::texture::mirrored_repeat
This commit is contained in:
parent
598ad99e65
commit
302e5e888f
1 changed files with 11 additions and 0 deletions
|
|
@ -70,6 +70,7 @@ namespace psemek::gfx
|
|||
void anisotropy();
|
||||
|
||||
void repeat();
|
||||
void mirrored_repeat();
|
||||
void clamp();
|
||||
|
||||
protected:
|
||||
|
|
@ -384,6 +385,16 @@ namespace psemek::gfx
|
|||
if constexpr (D >= 3) gl::TexParameteri(Target, gl::TEXTURE_WRAP_R, gl::REPEAT);
|
||||
}
|
||||
|
||||
template <std::size_t D, GLenum Target>
|
||||
void basic_texture<D, Target>::mirrored_repeat()
|
||||
{
|
||||
bind();
|
||||
|
||||
if constexpr (D >= 1) gl::TexParameteri(Target, gl::TEXTURE_WRAP_S, gl::MIRRORED_REPEAT);
|
||||
if constexpr (D >= 2) gl::TexParameteri(Target, gl::TEXTURE_WRAP_T, gl::MIRRORED_REPEAT);
|
||||
if constexpr (D >= 3) gl::TexParameteri(Target, gl::TEXTURE_WRAP_R, gl::MIRRORED_REPEAT);
|
||||
}
|
||||
|
||||
template <std::size_t D, GLenum Target>
|
||||
void basic_texture<D, Target>::clamp()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue