Skip to content

Commit

Permalink
Fix race between texture viewer creating its thumbnails & first use
Browse files Browse the repository at this point in the history
  • Loading branch information
baldurk committed Mar 3, 2015
1 parent 05fd837 commit 8fa5eb7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions renderdocui/Windows/TextureViewer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -741,6 +741,9 @@ public void OnLogfileLoaded()

m_Following = new Following(FollowType.OutputColour, 0);

rtPanel.ClearThumbnails();
texPanel.ClearThumbnails();

IntPtr contextHandle = pixelContext.Handle;
IntPtr renderHandle = render.Handle;
m_Core.Renderer.BeginInvoke((ReplayRenderer r) =>
Expand Down Expand Up @@ -876,6 +879,8 @@ public void OnEventSelected(UInt32 frameID, UInt32 eventID)

if (m_Output == null) return;

UI_CreateThumbnails();

int i = 0;
for(int rt=0; rt < RTs.Length; rt++)
{
Expand Down Expand Up @@ -1168,6 +1173,8 @@ public void OnEventSelected(UInt32 frameID, UInt32 eventID)

private void UI_CreateThumbnails()
{
if (rtPanel.Thumbnails.Length > 0 || texPanel.Thumbnails.Length > 0) return;

rtPanel.SuspendLayout();
texPanel.SuspendLayout();

Expand Down

0 comments on commit 8fa5eb7

Please sign in to comment.