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