Skip to content
Snippets Groups Projects
Commit 434928e4 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Merge branch 'feature/287/indierender' into 'master'

Implements #287 independent rendering

Closes #287

See merge request nicolas.pope/ftl!221
parents de61f18c dd806d16
Branches
Tags
1 merge request!221Implements #287 independent rendering
Pipeline #18715 passed
......@@ -276,9 +276,9 @@ void ftl::gui::Camera::update(ftl::rgbd::FrameSet &fs) {
name_ = "Virtual Camera";
// Do a draw if not active. If active the draw function will be called
// directly.
//if (screen_->activeCamera() != this) {
if (screen_->activeCamera() != this) {
_draw(fs);
//}
}
} else {
if (fid_ >= fs.frames.size()) return;
frame = &fs.frames[fid_];
......
......
......@@ -125,6 +125,16 @@ SourceWindow::SourceWindow(ftl::gui::Screen *screen)
return true;
});
ftl::timer::add(ftl::timer::kTimerMain, [this](int64_t ts) {
auto *c = screen_->activeCamera();
// Only offer full framerate render on active camera.
if (c) {
UNIQUE_LOCK(frameset_.mtx,lk);
c->draw(frameset_);
}
return true;
});
_updateCameras(screen_->control()->getNet()->findAll<string>("list_streams"));
// Also check for a file on command line.
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment