move time-lapse frame grab from tick to rec_loop

This commit is contained in:
2019-11-09 14:14:59 +01:00
parent faff1dd979
commit a00f78de80
4 changed files with 18 additions and 43 deletions

View File

@@ -108,8 +108,10 @@ PBO Layer::gen_equirect_pbo(glm::ivec2 size /*= { 0, 0 }*/)
PBO pbo;
TextureCube cube = gen_cube();
std::this_thread::yield();
RTT latlong;
latlong.create(size.x * 4, size.y * 2);
std::this_thread::yield();
App::I->render_task([&]
{
@@ -129,9 +131,9 @@ PBO Layer::gen_equirect_pbo(glm::ivec2 size /*= { 0, 0 }*/)
latlong.unbindFramebuffer();
});
std::this_thread::yield();
pbo.create(latlong);
std::this_thread::yield();
latlong.destroy();
cube.destroy();
return pbo;