Bugfix; correcting introduced bug with RenderSource and new Session

resolution.
This commit is contained in:
brunoherbelin
2021-02-11 20:28:57 +01:00
parent d45554e162
commit dca3033c06
4 changed files with 24 additions and 8 deletions

View File

@@ -329,7 +329,10 @@ RenderSource::RenderSource() : Source(), session_(nullptr)
bool RenderSource::failed() const
{
return (initialized_ && session_ == nullptr);
if (initialized_ && session_!=nullptr)
return renderbuffer_->resolution() != session_->frame()->resolution();
return false;
}
uint RenderSource::texture() const
@@ -365,6 +368,16 @@ void RenderSource::init()
}
glm::vec3 RenderSource::resolution() const
{
if (initialized_)
return renderbuffer_->resolution();
else if (session_ && session_->frame())
return session_->frame()->resolution();
else
return glm::vec3(0.f);
}
void RenderSource::accept(Visitor& v)
{
Source::accept(v);