mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-11 18:34:58 +01:00
Fixed Session thumbnail
wait for all sources to be ready before creating the thumbnail.
This commit is contained in:
@@ -75,7 +75,12 @@ void RenderView::draw()
|
||||
scene.root()->draw(glm::identity<glm::mat4>(), P);
|
||||
fading_overlay_->draw(glm::identity<glm::mat4>(), projection);
|
||||
frame_buffer_->end();
|
||||
}
|
||||
}
|
||||
|
||||
void RenderView::drawThumbnail()
|
||||
{
|
||||
if (frame_buffer_) {
|
||||
// if a thumbnailer is pending
|
||||
if (thumbnailer_.size() > 0) {
|
||||
|
||||
@@ -97,14 +102,14 @@ void RenderView::draw()
|
||||
}
|
||||
|
||||
// return valid thumbnail promise
|
||||
thumbnailer_.front().set_value( frame_thumbnail->image() );
|
||||
thumbnailer_.back().set_value( frame_thumbnail->image() );
|
||||
|
||||
// done with thumbnailing framebuffer
|
||||
delete frame_thumbnail;
|
||||
}
|
||||
catch(...) {
|
||||
// return failed thumbnail promise
|
||||
thumbnailer_.front().set_exception(std::current_exception());
|
||||
thumbnailer_.back().set_exception(std::current_exception());
|
||||
}
|
||||
|
||||
// done with this promise
|
||||
@@ -113,7 +118,6 @@ void RenderView::draw()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
FrameBufferImage *RenderView::thumbnail ()
|
||||
{
|
||||
// by default null image
|
||||
|
||||
Reference in New Issue
Block a user