From 9d3202ae5fdb08cea9db546eaac1fc1ae6a8327b Mon Sep 17 00:00:00 2001 From: baldurk Date: Fri, 16 Oct 2015 15:02:44 +0200 Subject: [PATCH] Don't conflict between C# UI and replay output flipping pixel context --- renderdoc/replay/replay_output.cpp | 4 +++- renderdocui/Windows/TextureViewer.cs | 7 ++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/renderdoc/replay/replay_output.cpp b/renderdoc/replay/replay_output.cpp index 8d5ce7c8e..15662bc10 100644 --- a/renderdoc/replay/replay_output.cpp +++ b/renderdoc/replay/replay_output.cpp @@ -358,7 +358,6 @@ void ReplayOutput::DisplayContext() if(m_PixelContext.outputID == 0) return; float color[4] = {0.0f, 0.0f, 0.0f, 0.0f}; m_pDevice->BindOutputWindow(m_PixelContext.outputID, false); - m_pDevice->ClearOutputWindowColour(m_PixelContext.outputID, color); if( (m_Config.m_Type != eOutputType_TexDisplay) || @@ -366,9 +365,12 @@ void ReplayOutput::DisplayContext() (m_RenderData.texDisplay.texid == ResourceId()) ) { + m_pDevice->RenderCheckerboard(Vec3f(0.666f, 0.666f, 0.666f), Vec3f(0.333f, 0.333f, 0.333f)); m_pDevice->FlipOutputWindow(m_PixelContext.outputID); return; } + + m_pDevice->ClearOutputWindowColour(m_PixelContext.outputID, color); TextureDisplay disp = m_RenderData.texDisplay; disp.rawoutput = false; diff --git a/renderdocui/Windows/TextureViewer.cs b/renderdocui/Windows/TextureViewer.cs index 3cb99b994..a2ab7ca72 100644 --- a/renderdocui/Windows/TextureViewer.cs +++ b/renderdocui/Windows/TextureViewer.cs @@ -2315,12 +2315,9 @@ namespace renderdocui.Windows private void pixelContext_Paint(object sender, PaintEventArgs e) { - if (m_Output == null || m_Core.Renderer == null || PixelPicked == false) + if (m_Output == null || m_Core.Renderer == null) { - if (backcolorPick.Checked) - e.Graphics.Clear(colorDialog.Color); - else - DrawCheckerboard(e.Graphics, pixelContext.DisplayRectangle); + DrawCheckerboard(e.Graphics, pixelContext.DisplayRectangle); return; }