FrameBuffer creation flags replace booleans

Instead of many creation options (with alpha, with multisampling, etc) use a single flag with boolean operators. Creation of the new mipmap flag for FrameBuffer, rendering the current FBO into multiple sub-resolutions.
This commit is contained in:
Bruno Herbelin
2022-05-22 15:14:10 +02:00
parent 7867aac55f
commit d695aa9f57
15 changed files with 151 additions and 77 deletions

View File

@@ -54,8 +54,8 @@ void DelayFilter::update (float dt)
if ( frames_.empty() || now_ - elapsed_.front() < delay_ + ( double(dt) * 0.002) )
{
// create a FBO if none can be reused (from above) and test for RAM in GPU
if (temp_frame_ == nullptr && ( frames_.empty() || Rendering::shouldHaveEnoughMemory(input_->resolution(), input_->use_alpha()) ) ){
temp_frame_ = new FrameBuffer( input_->resolution(), input_->use_alpha() );
if (temp_frame_ == nullptr && ( frames_.empty() || Rendering::shouldHaveEnoughMemory(input_->resolution(), input_->flags()) ) ){
temp_frame_ = new FrameBuffer( input_->resolution(), input_->flags() );
}
// image available
if (temp_frame_ != nullptr) {