GLuint ResourcePool::create_2d_texture(GLint internal_format, GLsizei width, GLsizei height)
{
+ assert(width > 0);
+ assert(height > 0);
+
pthread_mutex_lock(&lock);
// See if there's a texture on the freelist we can use.
for (list<GLuint>::iterator freelist_it = texture_freelist.begin();
pair<void *, GLuint> key(context, fbo_num);
assert(fbo_formats.count(key) != 0);
if (fbo_formats[key].texture_num == 0) {
+ fbo_formats.erase(key);
glDeleteFramebuffers(1, &fbo_num);
check_error();
fbo_freelist[context].erase(freelist_it++);