summaryrefslogtreecommitdiff
path: root/ui/icon.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-01-25 23:19:03 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-01-25 23:19:03 +0000
commite98fdea344f173c59b11549432b20114081a58b1 (patch)
tree5bd05eb297bb90f5cdd38a77e05ebf86106ec93a /ui/icon.cpp
parentReplace static_asserts with concepts (diff)
downloadilt-e98fdea344f173c59b11549432b20114081a58b1.tar.bz2
ilt-e98fdea344f173c59b11549432b20114081a58b1.tar.xz
ilt-e98fdea344f173c59b11549432b20114081a58b1.zip
Add traits helpers for glTexParameter functions
Diffstat (limited to 'ui/icon.cpp')
-rw-r--r--ui/icon.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/ui/icon.cpp b/ui/icon.cpp
index 38f4bf9..c3b5078 100644
--- a/ui/icon.cpp
+++ b/ui/icon.cpp
@@ -1,5 +1,5 @@
#include "icon.h"
-#include "glArrays.h"
+#include "gl_traits.h"
#include <gfx/image.h>
#include <glad/gl.h>
#include <resource.h>
@@ -13,11 +13,11 @@ Icon::Icon(const Image & tex) : size {tex.width, tex.height}
{
glBindTexture(GL_TEXTURE_2D, m_texture);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
+ glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_BORDER);
+ glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_BORDER);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, static_cast<GLsizei>(tex.width), static_cast<GLsizei>(tex.height), 0,
GL_RGBA, GL_UNSIGNED_BYTE, tex.data.data());
}