for (list<GLuint>::const_iterator freelist_it = texture_freelist.begin();
freelist_it != texture_freelist.end();
++freelist_it) {
- GLuint free_texture_num = program_freelist.front();
- program_freelist.pop_front();
+ GLuint free_texture_num = *freelist_it;
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);
void ResourcePool::delete_program(GLuint glsl_program_num)
{
bool found_program = false;
- for (std::map<std::pair<std::string, std::string>, GLuint>::iterator program_it = programs.begin();
+ for (map<pair<string, string>, GLuint>::iterator program_it = programs.begin();
program_it != programs.end();
++program_it) {
if (program_it->second == glsl_program_num) {
assert(found_program);
glDeleteProgram(glsl_program_num);
- std::map<GLuint, std::pair<GLuint, GLuint> >::iterator shader_it =
+ map<GLuint, pair<GLuint, GLuint> >::iterator shader_it =
program_shaders.find(glsl_program_num);
assert(shader_it != program_shaders.end());