X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Ftexture1d.cpp;h=df8dd06c75c705e06b31547b0501ea4a86e1c1fb;hp=feff9f9883f3f1b39921193fd75eb4c4e5effde4;hb=3a1b9cbe2441ae670a97541dc8ccb0a2860c8302;hpb=33b6ca811172d402fc891eeed9cd2a5edc28d61d diff --git a/source/core/texture1d.cpp b/source/core/texture1d.cpp index feff9f98..df8dd06c 100644 --- a/source/core/texture1d.cpp +++ b/source/core/texture1d.cpp @@ -42,22 +42,6 @@ void Texture1D::allocate(unsigned level) throw invalid_operation("Texture1D::allocate"); if(level>=levels) throw invalid_argument("Texture1D::allocate"); - - bool direct = ARB_texture_storage && ARB_direct_state_access; - if(!direct) - { - glActiveTexture(GL_TEXTURE0); - glBindTexture(target, id); - } - - allocate_(level); - - if(!direct) - glBindTexture(target, 0); -} - -void Texture1D::allocate_(unsigned level) -{ if(allocated&(1<=levels) throw out_of_range("Texture1D::sub_image"); - bool direct = (ARB_direct_state_access && (ARB_texture_storage || (allocated&(1<>level; } -UInt64 Texture1D::get_data_size() const +uint64_t Texture1D::get_data_size() const { return id ? width*get_pixel_size(storage_fmt) : 0; }