public void OnLogfileLoaded() { var outConfig = new OutputConfig(); outConfig.m_Type = OutputType.TexDisplay; saveTex.Enabled = gotoLocationButton.Enabled = viewTexBuffer.Enabled = true; m_Following = Following.Default; rwPanel.ClearThumbnails(); roPanel.ClearThumbnails(); RecreateRenderPanel(); RecreateContextPanel(); m_HighWaterStatusLength = 0; IntPtr contextHandle = pixelContext.Handle; IntPtr renderHandle = render.Handle; m_Core.Renderer.BeginInvoke((ReplayRenderer r) => { m_Output = r.CreateOutput(renderHandle, OutputType.TexDisplay); m_Output.SetPixelContext(contextHandle); m_Output.SetOutputConfig(outConfig); this.BeginInvoke(new Action(UI_CreateThumbnails)); }); m_FSWatcher = new FileSystemWatcher(Core.ConfigDirectory, "*" + m_Core.APIProps.ShaderExtension); m_FSWatcher.EnableRaisingEvents = true; m_FSWatcher.Changed += new FileSystemEventHandler(CustomShaderModified); m_FSWatcher.Renamed += new RenamedEventHandler(CustomShaderModified); m_FSWatcher.Created += new FileSystemEventHandler(CustomShaderModified); m_FSWatcher.Deleted += new FileSystemEventHandler(CustomShaderModified); ReloadCustomShaders(""); texturefilter.SelectedIndex = 0; texturefilter.Text = ""; textureList.FillTextureList("", true, true); m_TexDisplay.darkBackgroundColour = darkBack; m_TexDisplay.lightBackgroundColour = lightBack; m_TexDisplay.typeHint = FormatComponentType.None; m_Core.Renderer.BeginInvoke(RT_UpdateAndDisplay); }
public void OnLogfileLoaded() { ClearStoredData(); exportToToolStripMenuItem.Enabled = exportToolItem.Enabled = true; var draw = m_Core.CurDrawcall; if (MeshView) { if (draw == null) { m_VSIn.AbortThread(); m_VSOut.AbortThread(); m_GSOut.AbortThread(); return; } int curReq = m_ReqID; m_Core.Renderer.BeginInvoke((ReplayRenderer r) => { if (curReq != m_ReqID) return; m_Output = r.CreateOutput(RenderHandle); m_Output.SetOutputConfig(m_OutConfig); RT_UpdateRenderOutput(r); m_VSIn.m_Input = GetCurrentMeshInput(draw, MeshDataStage.VSIn); m_VSOut.m_Input = GetCurrentMeshInput(draw, MeshDataStage.VSOut); m_GSOut.m_Input = GetCurrentMeshInput(draw, MeshDataStage.GSOut); var contentsVSIn = RT_FetchBufferContents(MeshDataStage.VSIn, r, m_VSIn.m_Input); var contentsVSOut = RT_FetchBufferContents(MeshDataStage.VSOut, r, m_VSOut.m_Input); var contentsGSOut = RT_FetchBufferContents(MeshDataStage.GSOut, r, m_GSOut.m_Input); if (curReq != m_ReqID) return; this.BeginInvoke(new Action(() => { if (curReq != m_ReqID) return; UI_SetColumns(MeshDataStage.VSIn, m_VSIn.m_Input.BufferFormats); UI_SetRowsData(MeshDataStage.VSIn, contentsVSIn); if (m_VSOut.m_Input != null) { UI_SetColumns(MeshDataStage.VSOut, m_VSOut.m_Input.BufferFormats); UI_SetRowsData(MeshDataStage.VSOut, contentsVSOut); } if (m_GSOut.m_Input != null) { UI_SetColumns(MeshDataStage.GSOut, m_GSOut.m_Input.BufferFormats); UI_SetRowsData(MeshDataStage.GSOut, contentsGSOut); } })); }); } else { m_Core.Renderer.BeginInvoke((ReplayRenderer r) => { m_Output = r.CreateOutput(RenderHandle); m_Output.SetOutputConfig(m_OutConfig); RT_UpdateRenderOutput(r); }); } }
public void OnLogfileLoaded() { ClearStoredData(); exportToToolStripMenuItem.Enabled = exportToolItem.Enabled = true; var draw = m_Core.CurDrawcall; previewTab.SelectedIndex = 0; uint byteoffs = ByteOffset; if (MeshView) { if (draw == null) { m_VSIn.AbortThread(); m_VSOut.AbortThread(); m_GSOut.AbortThread(); return; } int curReq = m_ReqID; m_Core.Renderer.BeginInvoke((ReplayRenderer r) => { if (curReq != m_ReqID) return; m_Output = r.CreateOutput(RenderHandle, OutputType.MeshDisplay); m_Output.SetOutputConfig(m_OutConfig); RT_UpdateRenderOutput(r); m_Output.Display(); // pump the display once, this will fetch postvs data m_VSIn.m_Input = GetCurrentMeshInput(draw, MeshDataStage.VSIn); m_VSOut.m_Input = GetCurrentMeshInput(draw, MeshDataStage.VSOut); m_GSOut.m_Input = GetCurrentMeshInput(draw, MeshDataStage.GSOut); var contentsVSIn = RT_FetchBufferContents(MeshDataStage.VSIn, r, m_VSIn.m_Input, byteoffs); var contentsVSOut = RT_FetchBufferContents(MeshDataStage.VSOut, r, m_VSOut.m_Input, byteoffs); var contentsGSOut = RT_FetchBufferContents(MeshDataStage.GSOut, r, m_GSOut.m_Input, byteoffs); if (curReq != m_ReqID) return; this.BeginInvoke(new Action(() => { if (curReq != m_ReqID) return; UI_AutoFetchRenderComponents(MeshDataStage.VSIn, true); UI_AutoFetchRenderComponents(MeshDataStage.VSOut, true); UI_AutoFetchRenderComponents(MeshDataStage.GSOut, true); UI_AutoFetchRenderComponents(MeshDataStage.VSIn, false); UI_AutoFetchRenderComponents(MeshDataStage.VSOut, false); UI_AutoFetchRenderComponents(MeshDataStage.GSOut, false); UI_UpdateMeshRenderComponents(); UI_SetAllColumns(); UI_SetRowsData(MeshDataStage.VSIn, contentsVSIn, 0); if (m_VSOut.m_Input != null) UI_SetRowsData(MeshDataStage.VSOut, contentsVSOut, 0); if (m_GSOut.m_Input != null) UI_SetRowsData(MeshDataStage.GSOut, contentsGSOut, 0); camGuess_PropChanged(); })); }); } else { m_Core.Renderer.BeginInvoke((ReplayRenderer r) => { if (IsDisposed) return; m_Output = null; }); } }
public void OnLogfileLoaded() { var outConfig = new OutputConfig(); outConfig.m_Type = OutputType.TexDisplay; saveTex.Enabled = true; m_Following = new Following(FollowType.RT_UAV, 0); IntPtr contextHandle = pixelContext.Handle; IntPtr renderHandle = render.Handle; m_Core.Renderer.BeginInvoke((ReplayRenderer r) => { m_Output = r.CreateOutput(renderHandle); m_Output.SetPixelContext(contextHandle); m_Output.SetOutputConfig(outConfig); this.BeginInvoke(new Action(UI_CreateThumbnails)); }); m_FSWatcher = new FileSystemWatcher(Core.ConfigDirectory, "*.hlsl"); m_FSWatcher.EnableRaisingEvents = true; m_FSWatcher.Changed += new FileSystemEventHandler(CustomShaderModified); m_FSWatcher.Renamed += new RenamedEventHandler(CustomShaderModified); m_FSWatcher.Created += new FileSystemEventHandler(CustomShaderModified); m_FSWatcher.Deleted += new FileSystemEventHandler(CustomShaderModified); ReloadCustomShaders(""); texturefilter.SelectedIndex = 0; texturefilter.Text = ""; textureList.FillTextureList("", true, true); m_Core.Renderer.BeginInvoke(RT_UpdateAndDisplay); }