mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-09-24 06:36:08 +00:00
Show the pixel history tab early, fill it in with data when ready
This commit is contained in:
@@ -48,8 +48,7 @@ namespace renderdocui.Windows
|
||||
int numChannels, channelIdx;
|
||||
|
||||
public PixelHistoryView(Core core, FetchTexture tex, Point pt,
|
||||
float rangemin, float rangemax, bool[] channels,
|
||||
PixelModification[] history)
|
||||
float rangemin, float rangemax, bool[] channels)
|
||||
{
|
||||
InitializeComponent();
|
||||
|
||||
@@ -59,7 +58,6 @@ namespace renderdocui.Windows
|
||||
|
||||
texture = tex;
|
||||
pixel = pt;
|
||||
modifications = history;
|
||||
rangeMin = rangemin;
|
||||
rangeMax = rangemax;
|
||||
visibleChannels = channels;
|
||||
@@ -110,11 +108,28 @@ namespace renderdocui.Windows
|
||||
|
||||
eventsHidden.Text = "";
|
||||
|
||||
modifications = null;
|
||||
|
||||
events.BeginUpdate();
|
||||
|
||||
events.Nodes.Clear();
|
||||
|
||||
events.Nodes.Add(new object[] { "", "Loading...", "", "", "", "" });
|
||||
|
||||
events.EndUpdate();
|
||||
}
|
||||
|
||||
public void SetHistory(PixelModification[] history)
|
||||
{
|
||||
modifications = history;
|
||||
|
||||
UpdateEventList();
|
||||
}
|
||||
|
||||
void UpdateEventList()
|
||||
{
|
||||
if (modifications == null) return;
|
||||
|
||||
events.BeginUpdate();
|
||||
|
||||
events.Nodes.Clear();
|
||||
|
||||
@@ -2582,17 +2582,19 @@ namespace renderdocui.Windows
|
||||
{
|
||||
PixelModification[] history = null;
|
||||
|
||||
PixelHistoryView hist = new PixelHistoryView(m_Core, CurrentTexture, m_PickedPoint,
|
||||
m_TexDisplay.rangemin, m_TexDisplay.rangemax,
|
||||
new bool[] { m_TexDisplay.Red, m_TexDisplay.Green, m_TexDisplay.Blue, m_TexDisplay.Alpha });
|
||||
|
||||
hist.Show(DockPanel);
|
||||
|
||||
m_Core.Renderer.BeginInvoke((ReplayRenderer r) =>
|
||||
{
|
||||
history = r.PixelHistory(CurrentTexture.ID, (UInt32)m_PickedPoint.X, (UInt32)m_PickedPoint.Y);
|
||||
|
||||
this.BeginInvoke(new Action(() =>
|
||||
{
|
||||
PixelHistoryView hist = new PixelHistoryView(m_Core, CurrentTexture, m_PickedPoint,
|
||||
m_TexDisplay.rangemin, m_TexDisplay.rangemax,
|
||||
new bool[] { m_TexDisplay.Red, m_TexDisplay.Green, m_TexDisplay.Blue, m_TexDisplay.Alpha },
|
||||
history);
|
||||
hist.Show(DockPanel);
|
||||
hist.SetHistory(history);
|
||||
}));
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user