mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-12 02:40:00 +01:00
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:
@@ -77,9 +77,13 @@ void RenderView::setResolution(glm::vec3 resolution, bool useAlpha)
|
||||
frame_buffer_ = nullptr;
|
||||
}
|
||||
|
||||
if (!frame_buffer_)
|
||||
if (!frame_buffer_) {
|
||||
// output frame is an RBG Multisamples FrameBuffer
|
||||
frame_buffer_ = new FrameBuffer(resolution, useAlpha, true);
|
||||
FrameBuffer::FrameBufferFlags flag = FrameBuffer::FrameBuffer_multisampling;
|
||||
if (useAlpha)
|
||||
flag |= FrameBuffer::FrameBuffer_alpha;
|
||||
frame_buffer_ = new FrameBuffer(resolution, flag);
|
||||
}
|
||||
|
||||
// reset fading
|
||||
setFading();
|
||||
|
||||
Reference in New Issue
Block a user