public override void Update() { if (renderChain == null) { InitRenderChain(); } if (renderChain == null || renderChain.device == null) { return; } renderChain.ProcessChanges(); PanelClearSettings clearSettings = panel.clearSettings; if (clearSettings.clearColor || clearSettings.clearDepthStencil) { // Case 1277149: Clear color must be pre-multiplied like when we render. Color clearColor = clearSettings.color; clearColor = clearColor.RGBMultiplied(clearColor.a); GL.Clear(clearSettings.clearDepthStencil, // Clearing may impact MVP clearSettings.clearColor, clearColor, UIRUtility.k_ClearZ); } // Apply these debug values every frame because the render chain may have been recreated. renderChain.drawStats = drawStats; renderChain.device.breakBatches = breakBatches; renderChain.Render(); }
public override void Update() { if (renderChain == null) { InitRenderChain(); } if (renderChain == null || renderChain.device == null) { return; } using (s_MarkerDrawChain.Auto()) { renderChain.ProcessChanges(); PanelClearSettings clearSettings = panel.clearSettings; if (clearSettings.clearColor || clearSettings.clearDepthStencil) { // Case 1277149: Clear color must be pre-multiplied like when we render. Color clearColor = clearSettings.color; clearColor = clearColor.RGBMultiplied(clearColor.a); GL.Clear(clearSettings.clearDepthStencil, // Clearing may impact MVP clearSettings.clearColor, clearColor, UIRUtility.k_ClearZ); } renderChain.Render(); } }
public override void Update() { if (renderChain?.device == null) { return; } using (s_MarkerDrawChain.Auto()) { renderChain.ProcessChanges(); PanelClearFlags clearFlags = panel.clearFlags; if (clearFlags != PanelClearFlags.None) { GL.Clear((clearFlags & PanelClearFlags.Depth) != 0, // Clearing may impact MVP (clearFlags & PanelClearFlags.Color) != 0, Color.clear, UIRUtility.k_ClearZ); } renderChain.Render(); } }