/// <summary> /// Swaps the <see cref="OmegaEngine.Graphics.RenderTarget"/> texture with a secondary one - used for multiple <see cref="PostShaders"/> entries /// </summary> private void SwapRenderTarget() { // Make sure all fields are ready for use PrepareRenderTarget(); if (_secondaryRenderTarget == null) { using (new ProfilerEvent("Prepare secondary render target texture")) _secondaryRenderTarget = new RenderTarget(Engine, _area.Size); } // Swap the render targets UpdateUtils.Swap(ref RenderTarget, ref _secondaryRenderTarget); }