X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Ftexture3d.cpp;h=d22070e680e9d67272a0a7e47d71ffd8aa1a7233;hb=73eec11d44a24bac121f1b0d85f20d58005f3545;hp=5b33c3c6e1ef9153b68a654586dc37c42b1da7d6;hpb=85c6c43eb0f937f31f4a91ef3731d8bb2e98c8b4;p=libs%2Fgl.git diff --git a/source/texture3d.cpp b/source/texture3d.cpp index 5b33c3c6..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<