X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fcore%2Ftexture1d.cpp;h=03e02159a5b8dd49e6847366cd37c8e4d56d8e19;hb=4e9fe48180c7b4646ac2591e172de61f7a693b32;hp=7685d39e99abaeca025ae1c4750b6a53903ff08a;hpb=9b3bce7ae76ff8c0c81315d2505ea96bf422a318;p=libs%2Fgl.git diff --git a/source/core/texture1d.cpp b/source/core/texture1d.cpp index 7685d39e..03e02159 100644 --- a/source/core/texture1d.cpp +++ b/source/core/texture1d.cpp @@ -2,7 +2,6 @@ #include #include #include -#include "bindable.h" #include "error.h" #include "texture1d.h" @@ -43,36 +42,24 @@ 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<