glViewport(0, 0, width, height);
fbos.render_to(gray_tex);
glBindVertexArray(gray_vao);
- glUseProgram(gray_program);
glDisable(GL_BLEND);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
}
glViewport(0, 0, level_width, level_height);
fbos.render_to(grad0_tex);
- glUseProgram(sobel_program);
glDisable(GL_BLEND);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
}
glViewport(0, 0, width_patches, height_patches);
fbos.render_to(flow_out_tex);
- glUseProgram(motion_search_program);
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
}
glViewport(0, 0, level_width, level_height);
fbos.render_to(output_tex);
- glUseProgram(blend_program);
glDisable(GL_BLEND); // A bit ironic, perhaps.
glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
}
ScopedTimer timer("Blend", &total_timer);
blend.exec(tex0, tex1, flow_tex, output_tex, width, height, alpha);
}
+ pool.release_texture(flow_tex);
total_timer.end();
timers.print();