X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;ds=sidebyside;f=source%2Ftexture2d.cpp;fp=source%2Ftexture2d.cpp;h=559167f8ba4d5eefc017e6e158d76dec55127cf6;hb=73eec11d44a24bac121f1b0d85f20d58005f3545;hp=78011d3046ea5fb8189f823096fa8d730c651033;hpb=78840e775c62c1b6e3f550bf8be1f0b828df91aa;p=libs%2Fgl.git diff --git a/source/texture2d.cpp b/source/texture2d.cpp index 78011d30..559167f8 100644 --- a/source/texture2d.cpp +++ b/source/texture2d.cpp @@ -72,13 +72,12 @@ void Texture2D::allocate(unsigned level) if(ARB_texture_storage) { + Conditional _bind(!ARB_direct_state_access, this); if(ARB_direct_state_access) glTextureStorage2D(id, levels, ifmt, width, height); else - { - BindRestore _bind(this); glTexStorage2D(target, levels, ifmt, width, height); - } + apply_swizzle(); allocated |= (1<