mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-05 23:40:02 +01:00
Bugfix; correcting introduced bug with RenderSource and new Session
resolution.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user