osu.Framework/Graphics/Containers/BufferedContainerDrawNode.cs
/// <summary>
/// Makes sure the first frame buffer is always the one we want to draw from.
/// This saves us the need to sync the draw indices across draw node trees
/// since the SharedData.FrameBuffers array is already shared.
/// </summary>
Makes sure the first frame buffer is always the one we want to draw from.
This saves us the need to sync the draw indices across draw node trees
since the SharedData.FrameBuffers array is already shared.
Makes sure the first frame buffer is always the one we want to draw from . This saves us the need to sync the draw indices across draw node trees since the SharedData . FrameBuffers array is already shared .
private void finalizeFrameBuffer()
        {
            if (currentFrameBufferIndex != 0)
            {
                Trace.Assert(currentFrameBufferIndex == 1,
                    $"Only the first two framebuffers should be the last to be written to at the end of {nameof(Draw)}.");
                FrameBuffer temp = SharedData.FrameBuffers[0];
                SharedData.FrameBuffers[0] = SharedData.FrameBuffers[1];
                SharedData.FrameBuffers[1] = temp;
                currentFrameBufferIndex = 0;
            }
        }
private void finalizeFrameBuffer ( ) { if ( currentFrameBufferIndex != 0 ) { Trace . Assert ( currentFrameBufferIndex == 1 , $" Only the first two framebuffers should be the last to be written to at the end of  { nameof ( Draw ) } . " ) ; FrameBuffer temp = SharedData . FrameBuffers [ 0 ] ; SharedData . FrameBuffers [ 0 ] = SharedData . FrameBuffers [ 1 ] ; SharedData . FrameBuffers [ 1 ] = temp ; currentFrameBufferIndex = 0 ; } }
Makes sure the first frame buffer is always the one we want to draw from.
Makes sure the first frame buffer is always the one we want to draw from .