X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexturecube.cpp;h=d5453c182e128b13e201cb87d7b738e38caefd00;hb=89dc716abe7fa671e1da1c033d955cd72da73f33;hp=38d99367fe4441d431a7699d08515fc8977ae025;hpb=055f553b1a75f44e72f3c2b5a1c98c1e1e8f3f30;p=libs%2Fgl.git diff --git a/source/texturecube.cpp b/source/texturecube.cpp index 38d99367..d5453c18 100644 --- a/source/texturecube.cpp +++ b/source/texturecube.cpp @@ -59,7 +59,7 @@ void TextureCube::image(TextureCubeFace face, unsigned level, PixelFormat fmt, D if(s==0) throw out_of_range("TextureCube::image"); - Bind _bind(this, true); + BindRestore _bind(this); glTexImage2D(face, level, ifmt, s, s, 0, fmt, type, data); // XXX Allocation should be tracked per-face, but we'll run out of bits @@ -87,7 +87,7 @@ void TextureCube::image(TextureCubeFace face, const Graphics::Image &img) throw incompatible_data("TextureCube::image"); PixelStore pstore = PixelStore::from_image(img); - Bind _bind_ps(pstore, true); + BindRestore _bind_ps(pstore); image(face, 0, fmt, UNSIGNED_BYTE, img.get_data()); } @@ -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)