X-Git-Url: https://git.sesse.net/?p=movit;a=blobdiff_plain;f=resource_pool.cpp;h=eba79237678611bf474c065f81111e49531cfb94;hp=39af866bafd317319f1284d5b7ab218466749db3;hb=61e2a7671f7b22227dcdc34dd303ae4fcc802aaa;hpb=255a205ca10490f28eeaff69153afda578f94ff0 diff --git a/resource_pool.cpp b/resource_pool.cpp index 39af866..eba7923 100644 --- a/resource_pool.cpp +++ b/resource_pool.cpp @@ -294,8 +294,8 @@ void ResourcePool::release_2d_texture(GLuint texture_num) texture_freelist_bytes += estimate_texture_size(texture_formats[texture_num]); while (texture_freelist_bytes > texture_freelist_max_bytes) { - GLuint free_texture_num = texture_freelist.front(); - texture_freelist.pop_front(); + GLuint free_texture_num = texture_freelist.back(); + texture_freelist.pop_back(); assert(texture_formats.count(free_texture_num) != 0); texture_freelist_bytes -= estimate_texture_size(texture_formats[free_texture_num]); texture_formats.erase(free_texture_num);