From 89dc716abe7fa671e1da1c033d955cd72da73f33 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 5 Jan 2014 12:51:29 +0200 Subject: [PATCH] Use base pixelformat when loading texture data --- source/texture2d.cpp | 2 +- source/texturecube.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/source/texture2d.cpp b/source/texture2d.cpp index 973afebf..f4af7e72 100644 --- a/source/texture2d.cpp +++ b/source/texture2d.cpp @@ -124,7 +124,7 @@ void Texture2D::Loader::image_data(const string &data) void Texture2D::Loader::raw_data(const string &data) { - obj.image(0, obj.ifmt, UNSIGNED_BYTE, data.data()); + obj.image(0, get_base_pixelformat(obj.ifmt), UNSIGNED_BYTE, data.data()); } void Texture2D::Loader::storage(PixelFormat fmt, unsigned w, unsigned h) diff --git a/source/texturecube.cpp b/source/texturecube.cpp index 7f830118..d5453c18 100644 --- a/source/texturecube.cpp +++ b/source/texturecube.cpp @@ -183,7 +183,7 @@ void TextureCube::Loader::image_data(TextureCubeFace face, const string &data) void TextureCube::Loader::raw_data(TextureCubeFace face, const string &data) { - obj.image(face, 0, obj.ifmt, UNSIGNED_BYTE, data.data()); + obj.image(face, 0, get_base_pixelformat(obj.ifmt), UNSIGNED_BYTE, data.data()); } void TextureCube::Loader::storage(PixelFormat fmt, unsigned s) -- 2.45.2