346 const auto& gl = reactor.GetProcTable();
350 if (!gl.BlitFramebuffer.IsAvailable()) {
352 VALIDATION_LOG <<
"Texture blit fallback not implemented yet for GLES2.";
358 GLuint read_fbo = GL_NONE;
359 GLuint draw_fbo = GL_NONE;
360 fml::ScopedCleanupClosure delete_fbos([&gl, &read_fbo, &draw_fbo]() {
361 DeleteFBO(gl, read_fbo, GL_READ_FRAMEBUFFER);
362 DeleteFBO(gl, draw_fbo, GL_DRAW_FRAMEBUFFER);
367 if (!read.has_value()) {
370 read_fbo = read.value();
375 if (!draw.has_value()) {
378 draw_fbo = draw.value();
381 gl.Disable(GL_SCISSOR_TEST);
382 gl.Disable(GL_DEPTH_TEST);
383 gl.Disable(GL_STENCIL_TEST);
388 gl.BlitFramebuffer(source_region.GetX(),
389 source_region.GetY(),
390 source_region.GetWidth(),
391 source_region.GetHeight(),
392 destination_region.GetX(),
393 destination_region.GetY(),
394 destination_region.GetWidth(),
395 destination_region.GetHeight(),
static std::optional< GLuint > ConfigureFBO(const ProcTableGLES &gl, const std::shared_ptr< Texture > &texture, GLenum fbo_type)
static void DeleteFBO(const ProcTableGLES &gl, GLuint fbo, GLenum type)
std::shared_ptr< Texture > destination
std::shared_ptr< Texture > source
constexpr static TRect MakeSize(const TSize< U > &size)