]> git.tdb.fi Git - libs/gl.git/blobdiff - source/texture2d.cpp
Use base pixelformat when loading texture data
[libs/gl.git] / source / texture2d.cpp
index 973afebfcf277b75d217e2d0262e83846e06e41a..f4af7e7259bef9ccaf3319be8c56df51cd9881a0 100644 (file)
@@ -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)