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

Implements #287 independent rendering

parent de61f18c
No related branches found
No related tags found
No related merge requests found
...@@ -276,9 +276,9 @@ void ftl::gui::Camera::update(ftl::rgbd::FrameSet &fs) { ...@@ -276,9 +276,9 @@ void ftl::gui::Camera::update(ftl::rgbd::FrameSet &fs) {
name_ = "Virtual Camera"; name_ = "Virtual Camera";
// Do a draw if not active. If active the draw function will be called // Do a draw if not active. If active the draw function will be called
// directly. // directly.
//if (screen_->activeCamera() != this) { if (screen_->activeCamera() != this) {
_draw(fs); _draw(fs);
//} }
} else { } else {
if (fid_ >= fs.frames.size()) return; if (fid_ >= fs.frames.size()) return;
frame = &fs.frames[fid_]; frame = &fs.frames[fid_];
......
...@@ -125,6 +125,16 @@ SourceWindow::SourceWindow(ftl::gui::Screen *screen) ...@@ -125,6 +125,16 @@ SourceWindow::SourceWindow(ftl::gui::Screen *screen)
return true; 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")); _updateCameras(screen_->control()->getNet()->findAll<string>("list_streams"));
// Also check for a file on command line. // Also check for a file on command line.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment