- glFramebufferTexture2D(
- GL_FRAMEBUFFER,
- GL_COLOR_ATTACHMENT0,
- GL_TEXTURE_2D,
- output_textures[phases[phase]],
- 0);
- check_error();
- GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
- assert(status == GL_FRAMEBUFFER_COMPLETE);
- glViewport(0, 0, phases[phase]->output_width, phases[phase]->output_height);
+ fbo = resource_pool->create_fbo(context, output_textures[phase]);
+ glBindFramebuffer(GL_FRAMEBUFFER, fbo);
+ glViewport(0, 0, phase->output_width, phase->output_height);