X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexture3d.cpp;h=d22070e680e9d67272a0a7e47d71ffd8aa1a7233;hb=73eec11d44a24bac121f1b0d85f20d58005f3545;hp=c107fd7451a16a6f2f9c5368e065d20442249277;hpb=aead6d04308d7873dc99aa4572ce1590a89ebcbd;p=libs%2Fgl.git diff --git a/source/texture3d.cpp b/source/texture3d.cpp index c107fd74..d22070e6 100644 --- a/source/texture3d.cpp +++ b/source/texture3d.cpp @@ -60,13 +60,12 @@ void Texture3D::allocate(unsigned level) if(ARB_texture_storage) { + Conditional _bind(!ARB_direct_state_access, this); if(ARB_direct_state_access) glTextureStorage3D(id, levels, ifmt, width, height, depth); else - { - BindRestore _bind(this); glTexStorage3D(target, levels, ifmt, width, height, depth); - } + apply_swizzle(); allocated |= (1<