mirror of
https://github.com/brunoherbelin/vimix.git
synced 2026-05-05 09:15:13 +02:00
Update Canvas Session resolution to match Rendering manager total resolution
This commit is contained in:
@@ -121,11 +121,6 @@ void Canvas::detachCanvasSource(CanvasSource *cs)
|
||||
output_session_->deleteSource( cs );
|
||||
}
|
||||
|
||||
FrameBuffer *Canvas::getRenderedFrameBuffer() const
|
||||
{
|
||||
return output_session_->frame();
|
||||
}
|
||||
|
||||
void Canvas::update(float dt)
|
||||
{
|
||||
// Render canvases
|
||||
@@ -156,6 +151,10 @@ void Canvas::update(float dt)
|
||||
(*it)->touch();
|
||||
}
|
||||
}
|
||||
|
||||
// if resolution of output framebuffer changed, update session resolution
|
||||
if (output_session_->frame() && output_session_->frame()->resolution() != Rendering::manager().monitorsResolution())
|
||||
output_session_->setResolution(Rendering::manager().monitorsResolution());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,9 +43,6 @@ public:
|
||||
void attachCanvasSource(CanvasSource *cs);
|
||||
void detachCanvasSource(CanvasSource *cs);
|
||||
|
||||
// get result of rendering canvases
|
||||
FrameBuffer *getRenderedFrameBuffer() const;
|
||||
|
||||
// canvases are updated each frame in Mixer
|
||||
void update(float dt);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user