summaryrefslogtreecommitdiff
path: root/ui/font.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/font.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/font.cpp')
-rw-r--r--ui/font.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/ui/font.cpp b/ui/font.cpp
index ebd856d..305e0f3 100644
--- a/ui/font.cpp
+++ b/ui/font.cpp
@@ -4,10 +4,9 @@
#include <cctype>
#include <ft2build.h>
#include FT_FREETYPE_H
-#include "glArrays.h"
+#include "gl_traits.h"
#include <glRef.h>
#include <maths.h>
-#include <memory>
#include <optional>
#include <stdexcept>
#include <string>
@@ -124,10 +123,10 @@ Font::getTextureWithSpace(unsigned int adv) const
glBindTexture(GL_TEXTURE_2D, texture.texture);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RED, static_cast<GLsizei>(size.x), static_cast<GLsizei>(size.y), 0, GL_RED,
GL_UNSIGNED_BYTE, nullptr);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
- 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_WRAP_S, GL_CLAMP_TO_EDGE);
+ glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
+ glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameter(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
return fontTextures.size() - 1;
}