summaryrefslogtreecommitdiff
path: root/gfx/models/texture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gfx/models/texture.cpp')
-rw-r--r--gfx/models/texture.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/gfx/models/texture.cpp b/gfx/models/texture.cpp
index 79376bc..cff44f9 100644
--- a/gfx/models/texture.cpp
+++ b/gfx/models/texture.cpp
@@ -8,10 +8,13 @@
Cache<Texture, std::filesystem::path> Texture::cachedTexture;
-Texture::Texture(const std::filesystem::path & fileName)
+Texture::Texture(const std::filesystem::path & fileName) :
+ Texture {Image {Resource::mapPath(fileName).c_str(), STBI_rgb_alpha}}
{
- const Image tex {Resource::mapPath(fileName).c_str(), STBI_rgb_alpha};
+}
+Texture::Texture(const Image & tex)
+{
glBindTexture(GL_TEXTURE_2D, m_texture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);