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