From 731d7e5d6b2f7dd9081c55e7422575fa9dc55c31 Mon Sep 17 00:00:00 2001 From: Bruno Herbelin Date: Sun, 12 Mar 2023 15:06:50 +0100 Subject: [PATCH] Allow Aplpha channel for Bundle (Session Group Source) --- src/InfoVisitor.cpp | 7 ++++--- src/SessionSource.cpp | 10 +++------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/InfoVisitor.cpp b/src/InfoVisitor.cpp index 2cff27e..efd6cbf 100644 --- a/src/InfoVisitor.cpp +++ b/src/InfoVisitor.cpp @@ -181,14 +181,15 @@ void InfoVisitor::visit (SessionGroupSource& s) uint T = s.session()->numSources(); if (T>N) oss << " (" << std::to_string(T) << " total)"; + oss << std::endl; if (s.session()->frame()){ if (brief_) { - oss << ", RGB, " << s.session()->frame()->width() << " x " << s.session()->frame()->height(); + oss << (s.session()->frame()->flags() & FrameBuffer::FrameBuffer_alpha ? "RGBA, " : "RGB, "); + oss << s.session()->frame()->width() << " x " << s.session()->frame()->height(); } else { - oss << std::endl; - oss << "RGB" << std::endl; + oss << (s.session()->frame()->flags() & FrameBuffer::FrameBuffer_alpha ? "RGBA" : "RGB") << std::endl; oss << s.session()->frame()->width() << " x " << s.session()->frame()->height(); } } diff --git a/src/SessionSource.cpp b/src/SessionSource.cpp index 3f472f4..0213a12 100644 --- a/src/SessionSource.cpp +++ b/src/SessionSource.cpp @@ -24,14 +24,10 @@ #include "defines.h" #include "Log.h" #include "FrameBuffer.h" -#include "ImageShader.h" -#include "ImageProcessingShader.h" #include "Resource.h" #include "Decorations.h" -#include "SearchVisitor.h" +#include "Visitor.h" #include "Session.h" -#include "SessionCreator.h" -#include "Mixer.h" #include "SessionSource.h" @@ -377,7 +373,7 @@ void SessionGroupSource::init() if ( resolution_.x > 0.f && resolution_.y > 0.f ) { // valid resolution given to create render view - session_->setResolution( resolution_ ); + session_->setResolution( resolution_, true ); // deep update to make sure reordering of sources ++View::need_deep_update_; @@ -389,7 +385,7 @@ void SessionGroupSource::init() texturesurface_->setTextureIndex( session_->frame()->texture() ); // create Frame buffer matching size of session - FrameBuffer *renderbuffer = new FrameBuffer( session_->frame()->resolution() ); + FrameBuffer *renderbuffer = new FrameBuffer( session_->frame()->resolution(), FrameBuffer::FrameBuffer_alpha ); // set the renderbuffer of the source and attach rendering nodes attach(renderbuffer);