summaryrefslogtreecommitdiff
path: root/gfx/models/texture.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-01-01 17:56:26 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-01-01 17:56:26 +0000
commitd5cdbbf38380239524e351cb69aec94090884ca5 (patch)
tree5d7dff2f2775701069806eceb4eaef23b22eba3f /gfx/models/texture.h
parentReformat with new clang-format (diff)
parentRemove more use of legacy types (diff)
downloadilt-d5cdbbf38380239524e351cb69aec94090884ca5.tar.bz2
ilt-d5cdbbf38380239524e351cb69aec94090884ca5.tar.xz
ilt-d5cdbbf38380239524e351cb69aec94090884ca5.zip
Merge remote-tracking branch 'origin/terrain'
Diffstat (limited to 'gfx/models/texture.h')
-rw-r--r--gfx/models/texture.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/gfx/models/texture.h b/gfx/models/texture.h
index 1b66c64..5d40b39 100644
--- a/gfx/models/texture.h
+++ b/gfx/models/texture.h
@@ -1,5 +1,6 @@
#pragma once
+#include "config/types.h"
#include <cache.h>
#include <filesystem>
#include <glArrays.h>
@@ -39,10 +40,11 @@ public:
static void save(const glTexture &, const char * path);
static void saveDepth(const glTexture &, const char * path);
static void saveNormal(const glTexture &, const char * path);
+ static void savePosition(const glTexture &, const char * path);
protected:
static void save(const glTexture &, GLenum, GLenum, uint8_t channels, const char * path, uint8_t tgaFormat);
- static glm::ivec2 getSize(const glTexture &);
+ static TextureAbsCoord getSize(const glTexture &);
glTexture m_texture;
GLenum type;
@@ -53,7 +55,7 @@ public:
TextureAtlas(GLsizei width, GLsizei height, GLuint count);
void bind(GLenum unit = GL_TEXTURE0) const override;
- GLuint add(glm::ivec2 position, glm::ivec2 size, void * data, TextureOptions = {});
+ GLuint add(TextureAbsCoord position, TextureAbsCoord size, void * data, TextureOptions = {});
private:
glTexture m_atlas;