summaryrefslogtreecommitdiff
path: root/gfx/models/texture.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2023-11-09 00:40:40 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2023-11-09 00:40:40 +0000
commit9c2c3f71065c94a18c02440111b6ff8ca977b90e (patch)
tree339c9846cdd6937a5e77b37f88e3ee3674f944e5 /gfx/models/texture.cpp
parentWIP typedefing all the things - headers (diff)
downloadilt-9c2c3f71065c94a18c02440111b6ff8ca977b90e.tar.bz2
ilt-9c2c3f71065c94a18c02440111b6ff8ca977b90e.tar.xz
ilt-9c2c3f71065c94a18c02440111b6ff8ca977b90e.zip
WIP typedefing all the things - sources
Diffstat (limited to 'gfx/models/texture.cpp')
-rw-r--r--gfx/models/texture.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/gfx/models/texture.cpp b/gfx/models/texture.cpp
index f60d158..1685d34 100644
--- a/gfx/models/texture.cpp
+++ b/gfx/models/texture.cpp
@@ -61,10 +61,10 @@ Texture::bind(GLenum unit) const
glBindTexture(type, m_texture);
}
-glm::ivec2
+TextureAbsCoord
Texture::getSize(const glTexture & texture)
{
- glm::ivec2 size;
+ TextureAbsCoord size;
glGetTextureLevelParameteriv(texture, 0, GL_TEXTURE_WIDTH, &size.x);
glGetTextureLevelParameteriv(texture, 0, GL_TEXTURE_HEIGHT, &size.y);
return size;
@@ -137,7 +137,7 @@ TextureAtlas::bind(GLenum unit) const
}
GLuint
-TextureAtlas::add(glm::ivec2 position, glm::ivec2 size, void * data, TextureOptions to)
+TextureAtlas::add(TextureAbsCoord position, TextureAbsCoord size, void * data, TextureOptions to)
{
glTextureSubImage2D(m_texture, 0, position.x, position.y, size.x, size.y, GL_RGBA, GL_UNSIGNED_BYTE, data);