X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Ftexture2d.cpp;h=559167f8ba4d5eefc017e6e158d76dec55127cf6;hb=73eec11d44a24bac121f1b0d85f20d58005f3545;hp=47e0c7434d0ef56c7fbf892b0ee45a31f4552710;hpb=96340a856489e026b27377482b358c7ca2cf74b6;p=libs%2Fgl.git diff --git a/source/texture2d.cpp b/source/texture2d.cpp index 47e0c743..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<