// safely called from multiple threads at the same time, provided they have
// separate (but sharing) OpenGL contexts.
+#include <GL/glew.h>
+#include <pthread.h>
+#include <stddef.h>
#include <list>
#include <map>
#include <string>
#include <utility>
-#include <GL/glew.h>
-#include <pthread.h>
+
+namespace movit {
class ResourcePool {
public:
// or fetch a previous used if possible. Unbinds GL_TEXTURE_2D afterwards.
// Keeps ownership of the texture; you must call release_2d_texture() instead
// of deleting it when you no longer want it.
- //
- // Note: Currently we do not actually have a freelist, but this will change soon.
GLuint create_2d_texture(GLint internal_format, GLsizei width, GLsizei height);
void release_2d_texture(GLuint texture_num);
static size_t estimate_texture_size(const Texture2D &texture_format);
};
+} // namespace movit
+
#endif // !defined(_MOVIT_RESOURCE_POOL_H)