Important change: sources keep their id all lifelong.

This simplifies a lot history and testing in session.
This commit is contained in:
brunoherbelin
2021-04-13 22:26:26 +02:00
parent 268486b652
commit 17d2a63132
19 changed files with 62 additions and 178 deletions

View File

@@ -17,7 +17,7 @@
#include "Mixer.h"
SessionSource::SessionSource() : Source(), failed_(false)
SessionSource::SessionSource(uint64_t id) : Source(id), failed_(false)
{
session_ = new Session;
}
@@ -90,7 +90,7 @@ void SessionSource::update(float dt)
}
SessionFileSource::SessionFileSource() : SessionSource(), path_("")
SessionFileSource::SessionFileSource(uint64_t id) : SessionSource(id), path_("")
{
// specific node for transition view
groups_[View::TRANSITION]->visible_ = false;
@@ -235,7 +235,7 @@ void SessionFileSource::accept(Visitor& v)
}
SessionGroupSource::SessionGroupSource() : SessionSource(), resolution_(glm::vec3(0.f))
SessionGroupSource::SessionGroupSource(uint64_t id) : SessionSource(id), resolution_(glm::vec3(0.f))
{
// // redo frame for layers view
// frames_[View::LAYER]->clear();
@@ -316,16 +316,13 @@ void SessionGroupSource::accept(Visitor& v)
v.visit(*this);
}
RenderSource::RenderSource() : Source(), session_(nullptr)
RenderSource::RenderSource(uint64_t id) : Source(id), session_(nullptr)
{
// set symbol
symbol_ = new Symbol(Symbol::RENDER, glm::vec3(0.75f, 0.75f, 0.01f));
symbol_->scale_.y = 1.5f;
}
bool RenderSource::failed() const
{
if (initialized_ && session_!=nullptr)