X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexturecube.cpp;h=e767423fe539f9ee92fd10dd5af8f1beaa6eebb4;hb=ac51b8c24d6e9e2c2e1dee7822f3957917722000;hp=54a008ca50930054ee6c99507c27c032f4ff4e6c;hpb=cb836adcf11f690188df9b7bc59f3fe87b67aaa7;p=libs%2Fgl.git diff --git a/source/texturecube.cpp b/source/texturecube.cpp index 54a008ca..e767423f 100644 --- a/source/texturecube.cpp +++ b/source/texturecube.cpp @@ -77,11 +77,11 @@ void TextureCube::image(TextureCubeFace face, unsigned level, PixelFormat fmt, D if(s==0) throw out_of_range("TextureCube::image"); - BindRestore _bind(this); if(ARB_texture_storage) - sub_image(face, level, 0, 0, s, s, fmt, type, data); - else - glTexImage2D(face, level, ifmt, s, s, 0, fmt, type, data); + return sub_image(face, level, 0, 0, s, s, fmt, type, data); + + 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 allocated |= 1<