summaryrefslogtreecommitdiff
path: root/gfx/gl/glTexture.h
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/gl/glTexture.h')
-rw-r--r--gfx/gl/glTexture.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/gfx/gl/glTexture.h b/gfx/gl/glTexture.h
index c482198..5e5c838 100644
--- a/gfx/gl/glTexture.h
+++ b/gfx/gl/glTexture.h
@@ -2,12 +2,27 @@
#include "config/types.h"
#include "glArrays.h"
+#include "gl_traits.h"
namespace Impl {
// NOLINTNEXTLINE(readability-identifier-naming)
struct glTexture : Detail::glNamed {
[[nodiscard]] TextureDimensions getSize() const;
void bind(GLenum type = GL_TEXTURE_2D, GLenum unit = GL_TEXTURE0) const;
+
+ template<has_glTextureParameter T>
+ void
+ parameter(GLenum pname, T param)
+ {
+ (*gl_traits<T>::glTextureParameterFunc)(name, pname, param);
+ }
+
+ template<glm::length_t L, has_glTextureParameterv T, glm::qualifier Q>
+ void
+ parameter(GLenum pname, const glm::vec<L, T, Q> & param)
+ {
+ (*gl_traits<T>::glTextureParametervFunc)(name, pname, glm::value_ptr(param));
+ }
};
}