X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Ftexture1d.cpp;h=b50f8cf444c0c9fb1435ce97e756ffc1330b59c2;hp=7163aa7a78d846ed834c32abcdb67fcc99201aa8;hb=73eec11d44a24bac121f1b0d85f20d58005f3545;hpb=78840e775c62c1b6e3f550bf8be1f0b828df91aa diff --git a/source/texture1d.cpp b/source/texture1d.cpp index 7163aa7a..b50f8cf4 100644 --- a/source/texture1d.cpp +++ b/source/texture1d.cpp @@ -44,13 +44,12 @@ void Texture1D::allocate(unsigned level) if(ARB_texture_storage) { + Conditional _bind(!ARB_direct_state_access, this); if(ARB_direct_state_access) glTextureStorage1D(id, levels, ifmt, width); else - { - BindRestore _bind(this); glTexStorage1D(target, levels, ifmt, width); - } + apply_swizzle(); allocated |= (1<