X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexture3d.cpp;h=d22070e680e9d67272a0a7e47d71ffd8aa1a7233;hb=73eec11d44a24bac121f1b0d85f20d58005f3545;hp=971d3f165393fd00ec631bd3620740111b3bfae5;hpb=a40fc85277dba5c34402a0e703d038efd30cc57b;p=libs%2Fgl.git diff --git a/source/texture3d.cpp b/source/texture3d.cpp index 971d3f16..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<