When switching textures/events, leave pixel pick result valid

* This avoids a flicker when using remote replay while the pick result
  comes in
This commit is contained in:
baldurk
2016-08-19 15:47:47 +02:00
parent 6008458216
commit a786ac2eab
+8 -3
View File
@@ -1598,9 +1598,6 @@ namespace renderdocui.Windows
if (m_TexDisplay.typeHint == FormatComponentType.None && m_TextureSettings.ContainsKey(m_TexDisplay.texid))
m_TexDisplay.typeHint = m_TextureSettings[m_TexDisplay.texid].typeHint;
m_CurPixelValue = null;
m_CurRealValue = null;
// try to maintain the pan in the new texture. If the new texture
// is approx an integer multiple of the old texture, just changing
// the scale will keep everything the same. This is useful for
@@ -1833,6 +1830,9 @@ namespace renderdocui.Windows
if (tex.ID != ResourceId.Null)
{
if (m_Output != null)
RT_PickPixelsAndUpdate(m_PickedPoint.X, m_PickedPoint.Y, true);
var us = r.GetUsage(tex.ID);
var tb = m_Core.TimelineBar;
@@ -1845,6 +1845,11 @@ namespace renderdocui.Windows
}));
}
}
else
{
m_CurPixelValue = null;
m_CurRealValue = null;
}
});
}