X-Git-Url: http://git.tdb.fi/?p=libs%2Fgl.git;a=blobdiff_plain;f=source%2Fcore%2Ftexturecube.cpp;h=c56094c9cb0bd36e837db1df0c1c115fc38ad876;hp=ae06557dfe2ae40fa26ab9700e6a628ed0f5f7fc;hb=3a1b9cbe2441ae670a97541dc8ccb0a2860c8302;hpb=715672cf2c64dab0744db676fdee255ee3a4cef7 diff --git a/source/core/texturecube.cpp b/source/core/texturecube.cpp index ae06557d..c56094c9 100644 --- a/source/core/texturecube.cpp +++ b/source/core/texturecube.cpp @@ -80,34 +80,23 @@ void TextureCube::allocate(unsigned level) if(allocated&(64<=levels) throw out_of_range("TextureCube::image"); + unsigned lsz = get_level_size(level); + if(ARB_texture_storage) - { - unsigned lsz = get_level_size(level); return sub_image(face, level, 0, 0, lsz, lsz, data); - } - - glActiveTexture(GL_TEXTURE0); - glBindTexture(target, id); - - image_(face, level, data); - - if(auto_gen_mipmap && level==0 && (allocated&63)==63) - { - generate_mipmap_(); - allocated |= (64<=levels) throw out_of_range("TextureCube::sub_image"); - bool direct = (ARB_direct_state_access && (ARB_texture_storage || (allocated&(1<