-#include "resource_pool.h"
-
-#include <stdio.h>
+#include <assert.h>
#include <pthread.h>
-
+#include <stdio.h>
+#include <stdlib.h>
#include <algorithm>
#include <map>
#include <string>
#include <utility>
+#include "glew.h"
#include "init.h"
+#include "resource_pool.h"
#include "util.h"
using namespace std;
+namespace movit {
+
ResourcePool::ResourcePool(size_t program_freelist_max_length,
size_t texture_freelist_max_bytes)
: program_freelist_max_length(program_freelist_max_length),
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());
return texture_format.width * texture_format.height * bytes_per_pixel;
}
+
+} // namespace movit