private void ResetConfig() { m_OutConfig.m_Type = OutputType.MeshDisplay; m_MeshDisplay = new MeshDisplay(); m_MeshDisplay.type = MeshDataStage.VSIn; m_MeshDisplay.fov = 90.0f; m_MeshDisplay.solidShadeMode = SolidShadeMode.None; solidShading.SelectedIndex = 0; m_MeshDisplay.thisDrawOnly = true; drawRange.SelectedIndex = 0; m_MeshDisplay.currentMeshColour = new FloatVector(1, 0, 0, 1); m_MeshDisplay.prevMeshColour = new FloatVector(0, 0, 0, 1); if (m_Arcball != null) m_Arcball.Camera.Shutdown(); if (m_Flycam != null) m_Flycam.Camera.Shutdown(); m_Arcball = new ArcballCamera(); m_Flycam = new FlyCamera(); m_CurrentCamera = m_Arcball; m_Updater = new TimedUpdate(10, TimerUpdate); m_Arcball.SpeedMultiplier = m_Flycam.SpeedMultiplier = (float)camSpeed.Value; fovGuess.Text = m_MeshDisplay.fov.ToString("G"); controlType.SelectedIndex = 0; }
private void controlType_SelectedIndexChanged(object sender, EventArgs e) { m_Arcball.Reset(new Vec3f(0.0f, 0.0f, 0.0f), 10.0f); m_Flycam.Reset(new Vec3f(0.0f, 0.0f, 0.0f)); if (controlType.SelectedIndex == 0) { m_CurrentCamera = m_Arcball; m_Arcball.Reset(new Vec3f(0.0f, 0.0f, 0.0f), 10.0f); } else { m_CurrentCamera = m_Flycam; if (RasterizedOutputStage) m_Flycam.Reset(new Vec3f(0.0f, 0.0f, 0.0f)); else m_Flycam.Reset(new Vec3f(0.0f, 0.0f, -10.0f)); } UpdateHighlightVerts(GetUIState(m_MeshDisplay.type)); render.Invalidate(); }
private void resetCam_Click(object sender, EventArgs e) { m_Arcball.Reset(new Vec3f(0.0f, 0.0f, -10.0f)); if (m_MeshDisplay.type == MeshDataStage.VSIn) { m_Flycam.Reset(new Vec3f(0.0f, 0.0f, -10.0f)); m_CurrentCamera = m_Arcball; } else if(m_MeshDisplay.type == MeshDataStage.VSOut) { if (m_Core.CurPipelineState.IsTessellationEnabled) m_Flycam.Reset(new Vec3f(0.0f, 0.0f, -10.0f)); else m_Flycam.Reset(new Vec3f(0.0f, 0.0f, 0.0f)); m_CurrentCamera = m_Flycam; } else if(m_MeshDisplay.type == MeshDataStage.GSOut) { m_Flycam.Reset(new Vec3f(0.0f, 0.0f, 0.0f)); m_CurrentCamera = m_Flycam; } m_CurrentCamera.Apply(); m_Core.Renderer.BeginInvoke(RT_UpdateRenderOutput); render.Invalidate(); }
public BufferViewer(Core core, bool meshview) { InitializeComponent(); Icon = global::renderdocui.Properties.Resources.icon; UI_SetupDocks(meshview); m_Zeroes = new byte[512]; for (int i = 0; i < 512; i++) m_Zeroes[i] = 0; m_VSIn.m_GridView = vsInBufferView; m_VSOut.m_GridView = vsOutBufferView; m_GSOut.m_GridView = gsOutBufferView; m_ContextUIState = m_VSIn; DockHandler.GetPersistStringCallback = PersistString; exportToToolStripMenuItem.Enabled = exportToolItem.Enabled = false; m_Core = core; this.DoubleBuffered = true; SetStyle(ControlStyles.OptimizedDoubleBuffer, true); RenderHandle = render.Handle; render.Painting = true; render.MouseWheel += render_MouseWheel; render.MouseWheelHandler = render_MouseWheel; (render as Control).KeyDown += new KeyEventHandler(BufferViewer_KeyDown); (render as Control).KeyUp += new KeyEventHandler(BufferViewer_KeyUp); m_OutConfig.m_Type = OutputType.MeshDisplay; m_MeshDisplay.type = MeshDataStage.VSIn; m_MeshDisplay.fov = 90.0f; m_MeshDisplay.solidShadeMode = SolidShadeMode.None; solidShading.SelectedIndex = 0; m_MeshDisplay.thisDrawOnly = true; drawRange.SelectedIndex = 0; m_MeshDisplay.currentMeshColour = new FloatVector(1, 0, 0, 1); m_MeshDisplay.prevMeshColour = new FloatVector(0, 0, 0, 1); m_Arcball = new ArcballCamera(m_Camera); m_Flycam = new FlyCamera(m_Camera); m_CurrentCamera = m_Arcball; m_Updater = new TimedUpdate(10, TimerUpdate); m_Arcball.SpeedMultiplier = m_Flycam.SpeedMultiplier = (float)camSpeed.Value; fovGuess.Text = m_MeshDisplay.fov.ToString("G"); controlType.SelectedIndex = 0; MeshView = meshview; if (!MeshView) { debugVertexToolItem.Visible = debugSep.Visible = false; instLabel.Visible = instSep.Visible = instanceIdxToolitem.Visible = false; syncViewsToolItem.Visible = false; byteOffset.Text = "0"; Text = "Buffer Contents"; } else { byteOffset.Visible = false; byteOffsLab.Visible = false; byteOffset.Text = "0"; Text = "Mesh Output"; } m_Core.AddLogViewer(this); }
private void controlType_SelectedIndexChanged(object sender, EventArgs e) { if (controlType.SelectedIndex == 0) { m_CurrentCamera = m_Arcball; m_CurrentCamera.Reset(new Vec3f(0.0f, 0.0f, -10.0f)); } else { m_CurrentCamera = m_Flycam; if (m_MeshDisplay.type == MeshDataStage.VSIn) { m_CurrentCamera.Reset(new Vec3f(0.0f, 0.0f, -10.0f)); } else { if (m_Core.CurPipelineState.IsTessellationEnabled) m_CurrentCamera.Reset(new Vec3f(0.0f, 0.0f, -10.0f)); else m_CurrentCamera.Reset(new Vec3f(0.0f, 0.0f, 0.0f)); } } ClearHighlightVerts(); m_CurrentCamera.Apply(); m_Core.Renderer.BeginInvoke(RT_UpdateRenderOutput); render.Invalidate(); }
private void controlType_SelectedIndexChanged(object sender, EventArgs e) { m_Arcball.Reset(new Vec3f(0.0f, 0.0f, 0.0f), 10.0f); m_Flycam.Reset(new Vec3f(0.0f, 0.0f, 0.0f)); if (controlType.SelectedIndex == 0) { m_CurrentCamera = m_Arcball; m_Arcball.Reset(new Vec3f(0.0f, 0.0f, 0.0f), 10.0f); } else { m_CurrentCamera = m_Flycam; if (m_MeshDisplay.type == MeshDataStage.VSIn) { m_Flycam.Reset(new Vec3f(0.0f, 0.0f, -10.0f)); } else if (m_MeshDisplay.type == MeshDataStage.VSOut) { if (m_Core.CurPipelineState.IsTessellationEnabled) m_Flycam.Reset(new Vec3f(0.0f, 0.0f, -10.0f)); else m_Flycam.Reset(new Vec3f(0.0f, 0.0f, 0.0f)); } else if (m_MeshDisplay.type == MeshDataStage.GSOut) { m_Flycam.Reset(new Vec3f(0.0f, 0.0f, 0.0f)); m_CurrentCamera = m_Flycam; } } UpdateHighlightVerts(GetUIState(m_MeshDisplay.type)); render.Invalidate(); }
private void ResetConfig() { m_OutConfig.m_Type = OutputType.MeshDisplay; m_MeshDisplay = new MeshDisplay(); m_MeshDisplay.type = MeshDataStage.VSIn; m_MeshDisplay.fov = 90.0f; m_MeshDisplay.solidShadeMode = SolidShadeMode.None; solidShading.SelectedIndex = 0; m_MeshDisplay.showPrevInstances = false; m_MeshDisplay.showAllInstances = false; m_MeshDisplay.showWholePass = false; drawRange.SelectedIndex = 0; if (m_Arcball != null) m_Arcball.Camera.Shutdown(); if (m_Flycam != null) m_Flycam.Camera.Shutdown(); m_Arcball = new ArcballCamera(); m_Flycam = new FlyCamera(); m_CurrentCamera = m_Arcball; m_Updater = new TimedUpdate(10, TimerUpdate); m_Arcball.SpeedMultiplier = m_Flycam.SpeedMultiplier = (float)camSpeed.Value; fovGuess.Text = m_MeshDisplay.fov.ToString("G"); controlType.SelectedIndex = 0; }