if(cur::gfx_driver->SupportsFBOBlit())
{
m_fbc_main_color.Bind_Read();
if(!gl->CheckFrameBufferCompleteness(GL_READ_FRAMEBUFFER_EXT))
PEASSERT(0);
m_fbc_secondary.Bind_Write();
if(!gl->CheckFrameBufferCompleteness(GL_DRAW_FRAMEBUFFER_EXT))
PEASSERT(0);
glBlitFramebufferEXT(0, 0, m_rt_main_c.urt_size[0], m_rt_main_c.urt_size[1],
0, 0, m_rt_main_c.urt_size[0], m_rt_main_c.urt_size[1],
GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT, GL_NEAREST);
}
else
{
m_rt_secondary_c->Bind(0); // bind color texture
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, m_rt_main_c.urt_size[0], m_rt_main_c.urt_size[1]);
m_rt_secondary_d->Bind(0); // bind depth texture
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, m_rt_main_c.urt_size[0], m_rt_main_c.urt_size[1]);
}