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