From: Mikko Rasa Date: Fri, 28 Oct 2016 12:21:03 +0000 (+0300) Subject: Rearrange texture bind calls to keep them closer to where they're needed X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=194f960f91041ebee44e2745627d5e480e893d82;p=libs%2Fgl.git Rearrange texture bind calls to keep them closer to where they're needed --- diff --git a/source/texture1d.cpp b/source/texture1d.cpp index e5a496a4..ed7d8f6e 100644 --- a/source/texture1d.cpp +++ b/source/texture1d.cpp @@ -59,10 +59,10 @@ void Texture1D::image(unsigned level, PixelFormat fmt, DataType type, const void unsigned w = get_level_size(level); - BindRestore _bind(this); if(ARB_texture_storage) return sub_image(level, 0, w, fmt, type, data); + BindRestore _bind(this); glTexImage1D(target, level, ifmt, w, 0, fmt, type, data); allocated |= 1<