Further progress on pixel history view

* Added simple UI
* Don't apply SRGB curve to alpha data
* Account for clear calls not returning occlusion query results, and for
  depth/colour clears.
This commit is contained in:
baldurk
2014-07-11 22:20:56 +01:00
parent 8ef17e41e1
commit 3bb382d9cf
9 changed files with 938 additions and 441 deletions
+100
View File
@@ -0,0 +1,100 @@
namespace renderdocui.Windows
{
partial class PixelHistoryView
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
TreelistView.TreeListColumn treeListColumn1 = ((TreelistView.TreeListColumn)(new TreelistView.TreeListColumn("EID", "EID")));
TreelistView.TreeListColumn treeListColumn2 = ((TreelistView.TreeListColumn)(new TreelistView.TreeListColumn("Event", "Event")));
TreelistView.TreeListColumn treeListColumn3 = ((TreelistView.TreeListColumn)(new TreelistView.TreeListColumn("Before", "Before")));
TreelistView.TreeListColumn treeListColumn4 = ((TreelistView.TreeListColumn)(new TreelistView.TreeListColumn("BeforeCol", "")));
TreelistView.TreeListColumn treeListColumn5 = ((TreelistView.TreeListColumn)(new TreelistView.TreeListColumn("After", "After")));
TreelistView.TreeListColumn treeListColumn6 = ((TreelistView.TreeListColumn)(new TreelistView.TreeListColumn("AfterCol", "")));
this.events = new TreelistView.TreeListView();
((System.ComponentModel.ISupportInitialize)(this.events)).BeginInit();
this.SuspendLayout();
//
// events
//
treeListColumn1.AutoSizeMinSize = 10;
treeListColumn1.CellFormat.Padding = new System.Windows.Forms.Padding(4);
treeListColumn1.CellFormat.TextAlignment = System.Drawing.ContentAlignment.TopLeft;
treeListColumn1.Width = 50;
treeListColumn2.AutoSize = true;
treeListColumn2.AutoSizeMinSize = 20;
treeListColumn2.CellFormat.Padding = new System.Windows.Forms.Padding(4);
treeListColumn2.CellFormat.TextAlignment = System.Drawing.ContentAlignment.TopLeft;
treeListColumn2.Width = 100;
treeListColumn3.AutoSizeMinSize = 10;
treeListColumn3.Width = 50;
treeListColumn4.AutoSizeMinSize = 20;
treeListColumn4.Width = 40;
treeListColumn5.AutoSizeMinSize = 20;
treeListColumn5.Width = 60;
treeListColumn6.AutoSizeMinSize = 20;
treeListColumn6.Width = 40;
this.events.Columns.AddRange(new TreelistView.TreeListColumn[] {
treeListColumn1,
treeListColumn2,
treeListColumn3,
treeListColumn4,
treeListColumn5,
treeListColumn6});
this.events.Cursor = System.Windows.Forms.Cursors.Arrow;
this.events.Dock = System.Windows.Forms.DockStyle.Fill;
this.events.Location = new System.Drawing.Point(0, 0);
this.events.MultiSelect = false;
this.events.Name = "events";
this.events.RowOptions.ItemHeight = 64;
this.events.RowOptions.ShowHeader = false;
this.events.Size = new System.Drawing.Size(386, 478);
this.events.TabIndex = 1;
this.events.Text = "History Events";
this.events.ViewOptions.ShowLine = false;
this.events.ViewOptions.ShowPlusMinus = false;
this.events.NodeDoubleClicked += new TreelistView.TreeListView.NodeDoubleClickedHandler(this.events_NodeDoubleClicked);
//
// PixelHistoryView
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.ClientSize = new System.Drawing.Size(386, 478);
this.Controls.Add(this.events);
this.Font = new System.Drawing.Font("Microsoft Sans Serif", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.Name = "PixelHistoryView";
this.ShowHint = WeifenLuo.WinFormsUI.Docking.DockState.DockRight;
this.Text = "Pixel History";
((System.ComponentModel.ISupportInitialize)(this.events)).EndInit();
this.ResumeLayout(false);
}
#endregion
private TreelistView.TreeListView events;
}
}
+204
View File
@@ -0,0 +1,204 @@
/******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2014 Crytek
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
******************************************************************************/
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using WeifenLuo.WinFormsUI.Docking;
using renderdocui.Code;
using renderdoc;
namespace renderdocui.Windows
{
public partial class PixelHistoryView : DockContent, ILogViewerForm
{
Core m_Core;
public PixelHistoryView(Core core, FetchTexture tex, Point pt, PixelModification[] history)
{
InitializeComponent();
Icon = global::renderdocui.Properties.Resources.icon;
events.BeginInit();
events.BeginUpdate();
m_Core = core;
Text += String.Format(" on {0} for ({1}, {2})", tex.name, pt.X, pt.Y);
bool uintTex = (tex.format.compType == FormatComponentType.UInt);
bool sintTex = (tex.format.compType == FormatComponentType.SInt);
bool srgbTex = tex.format.srgbCorrected ||
(tex.creationFlags & TextureCreationFlags.SwapBuffer) > 0;
bool floatTex = (!uintTex && !sintTex);
foreach (PixelModification mod in history)
{
string name = "name";
var drawcall = core.GetDrawcall(core.CurFrame, mod.eventID);
if (drawcall == null) continue;
name = drawcall.name;
bool passed = true;
if (mod.backfaceCulled)
{
name += "\nBackface culled";
passed = false;
}
if (mod.depthClipped)
{
name += "\nDepth Clipped";
passed = false;
}
if (mod.scissorClipped)
{
name += "\nScissor Clipped";
passed = false;
}
if (mod.shaderDiscarded)
{
name += "\nShader executed a discard";
passed = false;
}
if (mod.depthTestFailed)
{
name += "\nDepth test failed";
passed = false;
}
if (mod.stencilTestFailed)
{
name += "\nStencil test failed";
passed = false;
}
string preModVal = "";
string postModVal = "";
if (uintTex)
{
preModVal = mod.preMod.value.u[0].ToString() + "\n" +
mod.preMod.value.u[1].ToString() + "\n" +
mod.preMod.value.u[2].ToString() + "\n" +
mod.preMod.value.u[3].ToString();
postModVal = mod.postMod.value.u[0].ToString() + "\n" +
mod.postMod.value.u[1].ToString() + "\n" +
mod.postMod.value.u[2].ToString() + "\n" +
mod.postMod.value.u[3].ToString();
}
else if (sintTex)
{
preModVal = mod.preMod.value.i[0].ToString() + "\n" +
mod.preMod.value.i[1].ToString() + "\n" +
mod.preMod.value.i[2].ToString() + "\n" +
mod.preMod.value.i[3].ToString();
postModVal = mod.postMod.value.i[0].ToString() + "\n" +
mod.postMod.value.i[1].ToString() + "\n" +
mod.postMod.value.i[2].ToString() + "\n" +
mod.postMod.value.i[3].ToString();
}
else
{
preModVal = Formatter.Format(mod.preMod.value.f[0]) + "\n" +
Formatter.Format(mod.preMod.value.f[1]) + "\n" +
Formatter.Format(mod.preMod.value.f[2]) + "\n" +
Formatter.Format(mod.preMod.value.f[3]);
postModVal = Formatter.Format(mod.postMod.value.f[0]) + "\n" +
Formatter.Format(mod.postMod.value.f[1]) + "\n" +
Formatter.Format(mod.postMod.value.f[2]) + "\n" +
Formatter.Format(mod.postMod.value.f[3]);
}
var node = events.Nodes.Add(new object[] { mod.eventID, name, preModVal, "", postModVal, "" });
node.BackColor = passed ? Color.FromArgb(235, 255, 235) : Color.FromArgb(255, 235, 235);
if (floatTex)
{
float r = Helpers.Clamp(mod.preMod.value.f[0], 0.0f, 1.0f);
float g = Helpers.Clamp(mod.preMod.value.f[1], 0.0f, 1.0f);
float b = Helpers.Clamp(mod.preMod.value.f[2], 0.0f, 1.0f);
if (srgbTex)
{
r = (float)Math.Pow(r, 1.0f / 2.2f);
g = (float)Math.Pow(g, 1.0f / 2.2f);
b = (float)Math.Pow(b, 1.0f / 2.2f);
}
node.IndexedBackColor[3] = Color.FromArgb((int)(255.0f * r), (int)(255.0f * g), (int)(255.0f * b));
r = Helpers.Clamp(mod.postMod.value.f[0], 0.0f, 1.0f);
g = Helpers.Clamp(mod.postMod.value.f[1], 0.0f, 1.0f);
b = Helpers.Clamp(mod.postMod.value.f[2], 0.0f, 1.0f);
if (srgbTex)
{
r = (float)Math.Pow(r, 1.0f / 2.2f);
g = (float)Math.Pow(g, 1.0f / 2.2f);
b = (float)Math.Pow(b, 1.0f / 2.2f);
}
node.IndexedBackColor[5] = Color.FromArgb((int)(255.0f * r), (int)(255.0f * g), (int)(255.0f * b));
}
node.Tag = mod.eventID;
}
events.EndUpdate();
events.EndInit();
}
public void OnLogfileClosed()
{
Close();
}
public void OnLogfileLoaded()
{
}
public void OnEventSelected(UInt32 frameID, UInt32 eventID)
{
}
private void events_NodeDoubleClicked(TreelistView.Node node)
{
if (node.Tag is uint)
{
m_Core.SetEventID(this, m_Core.CurFrame, (uint)node.Tag);
}
}
}
}
+120
View File
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
</root>
+111 -91
View File
@@ -110,6 +110,8 @@
this.customDelete = new System.Windows.Forms.ToolStripButton();
this.backcolorPick = new System.Windows.Forms.ToolStripButton();
this.checkerBack = new System.Windows.Forms.ToolStripButton();
this.gammaSeparator = new System.Windows.Forms.ToolStripSeparator();
this.gammaDisplay = new System.Windows.Forms.ToolStripButton();
this.statusbar = new System.Windows.Forms.StatusStrip();
this.texStatusDim = new System.Windows.Forms.ToolStripStatusLabel();
this.hoverSwatch = new System.Windows.Forms.ToolStripStatusLabel();
@@ -120,28 +122,28 @@
this.debugPixel = new System.Windows.Forms.ToolStripButton();
this.texListShow = new System.Windows.Forms.ToolStripButton();
this.texlistContainer = new System.Windows.Forms.TableLayoutPanel();
this.textureList = new renderdocui.Controls.TextureListBox();
this.texturefilter = new System.Windows.Forms.ComboBox();
this.label1 = new System.Windows.Forms.Label();
this.clearTexFilter = new System.Windows.Forms.Button();
this.renderToolstripContainer = new System.Windows.Forms.ToolStripContainer();
this.renderScrollTable = new System.Windows.Forms.TableLayoutPanel();
this.renderContainer = new renderdocui.Controls.NoScrollPanel();
this.render = new renderdocui.Controls.NoScrollPanel();
this.renderVScroll = new System.Windows.Forms.VScrollBar();
this.renderHScroll = new System.Windows.Forms.HScrollBar();
this.pixelContextPanel = new System.Windows.Forms.TableLayoutPanel();
this.pixelContext = new renderdocui.Controls.NoScrollPanel();
this.debugPixelContext = new System.Windows.Forms.Button();
this.pixelHistory = new System.Windows.Forms.Button();
this.tabContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
this.closeTab = new System.Windows.Forms.ToolStripMenuItem();
this.closeOtherTabs = new System.Windows.Forms.ToolStripMenuItem();
this.closeTabsToRight = new System.Windows.Forms.ToolStripMenuItem();
this.gammaDisplay = new System.Windows.Forms.ToolStripButton();
this.gammaSeparator = new System.Windows.Forms.ToolStripSeparator();
this.textureList = new renderdocui.Controls.TextureListBox();
this.texPanel = new renderdocui.Controls.ThumbnailStrip();
this.rtPanel = new renderdocui.Controls.ThumbnailStrip();
this.pixelContext = new renderdocui.Controls.NoScrollPanel();
this.renderContainer = new renderdocui.Controls.NoScrollPanel();
this.render = new renderdocui.Controls.NoScrollPanel();
this.rangeHistogram = new renderdocui.Controls.RangeHistogram();
this.toolTip = new System.Windows.Forms.ToolTip(this.components);
subSep = new System.Windows.Forms.ToolStripSeparator();
toolStripLabel2 = new System.Windows.Forms.ToolStripLabel();
toolStripLabel3 = new System.Windows.Forms.ToolStripLabel();
@@ -163,9 +165,9 @@
this.renderToolstripContainer.ContentPanel.SuspendLayout();
this.renderToolstripContainer.SuspendLayout();
this.renderScrollTable.SuspendLayout();
this.renderContainer.SuspendLayout();
this.pixelContextPanel.SuspendLayout();
this.tabContextMenu.SuspendLayout();
this.renderContainer.SuspendLayout();
this.SuspendLayout();
//
// subSep
@@ -861,6 +863,26 @@
this.checkerBack.ToolTipText = "Alpha: Show Checkerboard Background";
this.checkerBack.Click += new System.EventHandler(this.checkerBack_Click);
//
// gammaSeparator
//
this.gammaSeparator.Name = "gammaSeparator";
this.gammaSeparator.Size = new System.Drawing.Size(6, 25);
//
// gammaDisplay
//
this.gammaDisplay.Checked = true;
this.gammaDisplay.CheckOnClick = true;
this.gammaDisplay.CheckState = System.Windows.Forms.CheckState.Checked;
this.gammaDisplay.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.gammaDisplay.Image = ((System.Drawing.Image)(resources.GetObject("gammaDisplay.Image")));
this.gammaDisplay.ImageTransparentColor = System.Drawing.Color.Magenta;
this.gammaDisplay.Name = "gammaDisplay";
this.gammaDisplay.Size = new System.Drawing.Size(23, 22);
this.gammaDisplay.Text = "γ";
this.gammaDisplay.ToolTipText = "Override display of linear data in gamma space\r\n\r\nSee FAQ on \"Gamma display of li" +
"near data\"";
this.gammaDisplay.CheckedChanged += new System.EventHandler(this.updateChannelsHandler);
//
// statusbar
//
this.statusbar.Dock = System.Windows.Forms.DockStyle.None;
@@ -871,7 +893,7 @@
this.statusbar.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.Flow;
this.statusbar.Location = new System.Drawing.Point(0, 0);
this.statusbar.Name = "statusbar";
this.statusbar.Size = new System.Drawing.Size(420, 19);
this.statusbar.Size = new System.Drawing.Size(420, 18);
this.statusbar.SizingGrip = false;
this.statusbar.TabIndex = 0;
//
@@ -984,6 +1006,20 @@
this.texlistContainer.Size = new System.Drawing.Size(136, 260);
this.texlistContainer.TabIndex = 1;
//
// textureList
//
this.texlistContainer.SetColumnSpan(this.textureList, 2);
this.textureList.Dock = System.Windows.Forms.DockStyle.Fill;
this.textureList.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.textureList.IntegralHeight = false;
this.textureList.ItemHeight = 16;
this.textureList.Location = new System.Drawing.Point(3, 50);
this.textureList.Name = "textureList";
this.textureList.SelectionMode = System.Windows.Forms.SelectionMode.None;
this.textureList.Size = new System.Drawing.Size(130, 207);
this.textureList.TabIndex = 0;
this.textureList.MouseUp += new System.Windows.Forms.MouseEventHandler(this.textureList_MouseUp);
//
// texturefilter
//
this.texturefilter.Dock = System.Windows.Forms.DockStyle.Fill;
@@ -1033,7 +1069,7 @@
// renderToolstripContainer.ContentPanel
//
this.renderToolstripContainer.ContentPanel.Controls.Add(this.renderScrollTable);
this.renderToolstripContainer.ContentPanel.Size = new System.Drawing.Size(420, 247);
this.renderToolstripContainer.ContentPanel.Size = new System.Drawing.Size(420, 248);
this.renderToolstripContainer.LeftToolStripPanelVisible = false;
this.renderToolstripContainer.Location = new System.Drawing.Point(299, 87);
this.renderToolstripContainer.Name = "renderToolstripContainer";
@@ -1058,16 +1094,43 @@
this.renderScrollTable.RowCount = 2;
this.renderScrollTable.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.renderScrollTable.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.renderScrollTable.Size = new System.Drawing.Size(420, 247);
this.renderScrollTable.Size = new System.Drawing.Size(420, 248);
this.renderScrollTable.TabIndex = 2;
//
// renderContainer
//
this.renderContainer.BackColor = System.Drawing.Color.Maroon;
this.renderContainer.Controls.Add(this.render);
this.renderContainer.Dock = System.Windows.Forms.DockStyle.Fill;
this.renderContainer.Location = new System.Drawing.Point(0, 0);
this.renderContainer.Margin = new System.Windows.Forms.Padding(0);
this.renderContainer.Name = "renderContainer";
this.renderContainer.Size = new System.Drawing.Size(404, 232);
this.renderContainer.TabIndex = 1;
//
// render
//
this.render.BackColor = System.Drawing.Color.Black;
this.render.Dock = System.Windows.Forms.DockStyle.Fill;
this.render.Location = new System.Drawing.Point(0, 0);
this.render.Name = "render";
this.render.Size = new System.Drawing.Size(404, 232);
this.render.TabIndex = 0;
this.render.Paint += new System.Windows.Forms.PaintEventHandler(this.render_Paint);
this.render.Layout += new System.Windows.Forms.LayoutEventHandler(this.render_Layout);
this.render.MouseClick += new System.Windows.Forms.MouseEventHandler(this.render_MouseClick);
this.render.MouseDown += new System.Windows.Forms.MouseEventHandler(this.render_MouseClick);
this.render.MouseLeave += new System.EventHandler(this.render_MouseLeave);
this.render.MouseMove += new System.Windows.Forms.MouseEventHandler(this.render_MouseMove);
this.render.MouseUp += new System.Windows.Forms.MouseEventHandler(this.render_MouseUp);
//
// renderVScroll
//
this.renderVScroll.Dock = System.Windows.Forms.DockStyle.Right;
this.renderVScroll.Enabled = false;
this.renderVScroll.Location = new System.Drawing.Point(404, 0);
this.renderVScroll.Name = "renderVScroll";
this.renderVScroll.Size = new System.Drawing.Size(16, 231);
this.renderVScroll.Size = new System.Drawing.Size(16, 232);
this.renderVScroll.TabIndex = 2;
this.renderVScroll.Scroll += new System.Windows.Forms.ScrollEventHandler(this.renderVScroll_Scroll);
//
@@ -1075,7 +1138,7 @@
//
this.renderHScroll.Dock = System.Windows.Forms.DockStyle.Bottom;
this.renderHScroll.Enabled = false;
this.renderHScroll.Location = new System.Drawing.Point(0, 231);
this.renderHScroll.Location = new System.Drawing.Point(0, 232);
this.renderHScroll.Name = "renderHScroll";
this.renderHScroll.Size = new System.Drawing.Size(404, 16);
this.renderHScroll.TabIndex = 3;
@@ -1083,30 +1146,56 @@
//
// pixelContextPanel
//
this.pixelContextPanel.ColumnCount = 1;
this.pixelContextPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.pixelContextPanel.ColumnCount = 2;
this.pixelContextPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.pixelContextPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F));
this.pixelContextPanel.Controls.Add(this.pixelContext, 0, 0);
this.pixelContextPanel.Controls.Add(this.debugPixelContext, 0, 1);
this.pixelContextPanel.Controls.Add(this.debugPixelContext, 1, 1);
this.pixelContextPanel.Controls.Add(this.pixelHistory, 0, 1);
this.pixelContextPanel.Location = new System.Drawing.Point(780, 258);
this.pixelContextPanel.Name = "pixelContextPanel";
this.pixelContextPanel.RowCount = 2;
this.pixelContextPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F));
this.pixelContextPanel.RowStyles.Add(new System.Windows.Forms.RowStyle());
this.pixelContextPanel.Size = new System.Drawing.Size(108, 127);
this.pixelContextPanel.Size = new System.Drawing.Size(215, 156);
this.pixelContextPanel.TabIndex = 11;
//
// pixelContext
//
this.pixelContext.BackColor = System.Drawing.Color.Transparent;
this.pixelContextPanel.SetColumnSpan(this.pixelContext, 2);
this.pixelContext.Dock = System.Windows.Forms.DockStyle.Fill;
this.pixelContext.Location = new System.Drawing.Point(3, 3);
this.pixelContext.Name = "pixelContext";
this.pixelContext.Size = new System.Drawing.Size(209, 121);
this.pixelContext.TabIndex = 6;
this.pixelContext.Paint += new System.Windows.Forms.PaintEventHandler(this.pixelContext_Paint);
//
// debugPixelContext
//
this.debugPixelContext.Anchor = System.Windows.Forms.AnchorStyles.Bottom;
this.debugPixelContext.AutoSize = true;
this.debugPixelContext.Location = new System.Drawing.Point(5, 101);
this.debugPixelContext.Location = new System.Drawing.Point(136, 130);
this.debugPixelContext.Name = "debugPixelContext";
this.debugPixelContext.Size = new System.Drawing.Size(97, 23);
this.debugPixelContext.Size = new System.Drawing.Size(49, 23);
this.debugPixelContext.TabIndex = 7;
this.debugPixelContext.Text = "Debug This Pixel";
this.debugPixelContext.Text = "Debug";
this.toolTip.SetToolTip(this.debugPixelContext, "Debug this pixel");
this.debugPixelContext.UseVisualStyleBackColor = true;
this.debugPixelContext.Click += new System.EventHandler(this.debugPixel_Click);
//
// pixelHistory
//
this.pixelHistory.Anchor = System.Windows.Forms.AnchorStyles.Top;
this.pixelHistory.Location = new System.Drawing.Point(29, 130);
this.pixelHistory.Name = "pixelHistory";
this.pixelHistory.Size = new System.Drawing.Size(48, 23);
this.pixelHistory.TabIndex = 8;
this.pixelHistory.Text = "History";
this.toolTip.SetToolTip(this.pixelHistory, "Show history for this pixel");
this.pixelHistory.UseVisualStyleBackColor = true;
this.pixelHistory.Click += new System.EventHandler(this.pixelHistory_Click);
//
// tabContextMenu
//
this.tabContextMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
@@ -1138,40 +1227,6 @@
this.closeTabsToRight.Text = "Close tabs to right";
this.closeTabsToRight.Click += new System.EventHandler(this.closeTabsToRight_Click);
//
// gammaDisplay
//
this.gammaDisplay.Checked = true;
this.gammaDisplay.CheckOnClick = true;
this.gammaDisplay.CheckState = System.Windows.Forms.CheckState.Checked;
this.gammaDisplay.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Text;
this.gammaDisplay.Image = ((System.Drawing.Image)(resources.GetObject("gammaDisplay.Image")));
this.gammaDisplay.ImageTransparentColor = System.Drawing.Color.Magenta;
this.gammaDisplay.Name = "gammaDisplay";
this.gammaDisplay.Size = new System.Drawing.Size(23, 22);
this.gammaDisplay.Text = "γ";
this.gammaDisplay.ToolTipText = "Override display of linear data in gamma space\r\n\r\nSee FAQ on \"Gamma display of li" +
"near data\"";
this.gammaDisplay.CheckedChanged += new System.EventHandler(this.updateChannelsHandler);
//
// gammaSeparator
//
this.gammaSeparator.Name = "gammaSeparator";
this.gammaSeparator.Size = new System.Drawing.Size(6, 25);
//
// textureList
//
this.texlistContainer.SetColumnSpan(this.textureList, 2);
this.textureList.Dock = System.Windows.Forms.DockStyle.Fill;
this.textureList.DrawMode = System.Windows.Forms.DrawMode.OwnerDrawFixed;
this.textureList.IntegralHeight = false;
this.textureList.ItemHeight = 16;
this.textureList.Location = new System.Drawing.Point(3, 50);
this.textureList.Name = "textureList";
this.textureList.SelectionMode = System.Windows.Forms.SelectionMode.None;
this.textureList.Size = new System.Drawing.Size(130, 207);
this.textureList.TabIndex = 0;
this.textureList.MouseUp += new System.Windows.Forms.MouseEventHandler(this.textureList_MouseUp);
//
// texPanel
//
this.texPanel.AutoScroll = true;
@@ -1197,43 +1252,6 @@
this.rtPanel.TabIndex = 2;
this.rtPanel.MouseClick += new System.Windows.Forms.MouseEventHandler(this.thumbsLayout_MouseClick);
//
// pixelContext
//
this.pixelContext.BackColor = System.Drawing.Color.Transparent;
this.pixelContext.Dock = System.Windows.Forms.DockStyle.Fill;
this.pixelContext.Location = new System.Drawing.Point(3, 3);
this.pixelContext.Name = "pixelContext";
this.pixelContext.Size = new System.Drawing.Size(102, 92);
this.pixelContext.TabIndex = 6;
this.pixelContext.Paint += new System.Windows.Forms.PaintEventHandler(this.pixelContext_Paint);
//
// renderContainer
//
this.renderContainer.BackColor = System.Drawing.Color.Maroon;
this.renderContainer.Controls.Add(this.render);
this.renderContainer.Dock = System.Windows.Forms.DockStyle.Fill;
this.renderContainer.Location = new System.Drawing.Point(0, 0);
this.renderContainer.Margin = new System.Windows.Forms.Padding(0);
this.renderContainer.Name = "renderContainer";
this.renderContainer.Size = new System.Drawing.Size(404, 231);
this.renderContainer.TabIndex = 1;
//
// render
//
this.render.BackColor = System.Drawing.Color.Black;
this.render.Dock = System.Windows.Forms.DockStyle.Fill;
this.render.Location = new System.Drawing.Point(0, 0);
this.render.Name = "render";
this.render.Size = new System.Drawing.Size(404, 231);
this.render.TabIndex = 0;
this.render.Paint += new System.Windows.Forms.PaintEventHandler(this.render_Paint);
this.render.Layout += new System.Windows.Forms.LayoutEventHandler(this.render_Layout);
this.render.MouseClick += new System.Windows.Forms.MouseEventHandler(this.render_MouseClick);
this.render.MouseDown += new System.Windows.Forms.MouseEventHandler(this.render_MouseClick);
this.render.MouseLeave += new System.EventHandler(this.render_MouseLeave);
this.render.MouseMove += new System.Windows.Forms.MouseEventHandler(this.render_MouseMove);
this.render.MouseUp += new System.Windows.Forms.MouseEventHandler(this.render_MouseUp);
//
// rangeHistogram
//
this.rangeHistogram.BackColor = System.Drawing.SystemColors.GradientActiveCaption;
@@ -1299,10 +1317,10 @@
this.renderToolstripContainer.ResumeLayout(false);
this.renderToolstripContainer.PerformLayout();
this.renderScrollTable.ResumeLayout(false);
this.renderContainer.ResumeLayout(false);
this.pixelContextPanel.ResumeLayout(false);
this.pixelContextPanel.PerformLayout();
this.tabContextMenu.ResumeLayout(false);
this.renderContainer.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@@ -1403,6 +1421,8 @@
private System.Windows.Forms.ToolStripButton customEdit;
private System.Windows.Forms.ToolStripButton gammaDisplay;
private System.Windows.Forms.ToolStripSeparator gammaSeparator;
private System.Windows.Forms.ToolTip toolTip;
private System.Windows.Forms.Button pixelHistory;
}
}
+26 -2
View File
@@ -1291,7 +1291,11 @@ namespace renderdocui.Windows
if (value == true)
{
debugPixel.Enabled = debugPixelContext.Enabled = true;
debugPixel.Text = debugPixelContext.Text = "Debug this Pixel";
toolTip.RemoveAll();
toolTip.SetToolTip(debugPixelContext, "Debug this pixel");
toolTip.SetToolTip(pixelHistory, "Show history for this pixel");
pixelHistory.Enabled = true;
}
else
{
@@ -1299,7 +1303,11 @@ namespace renderdocui.Windows
m_CurRealValue = null;
debugPixel.Enabled = debugPixelContext.Enabled = false;
debugPixel.Text = debugPixelContext.Text = "RMB to Pick";
toolTip.RemoveAll();
toolTip.SetToolTip(debugPixelContext, "Right Click to choose a pixel");
toolTip.SetToolTip(pixelHistory, "Right Click to choose a pixel");
pixelHistory.Enabled = false;
}
pixelContext.Invalidate();
@@ -2544,6 +2552,22 @@ namespace renderdocui.Windows
render.Invalidate();
}
private void pixelHistory_Click(object sender, EventArgs e)
{
PixelModification[] history = null;
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, history);
hist.Show(DockPanel);
}));
});
}
private void debugPixel_Click(object sender, EventArgs e)
{
ShaderDebugTrace trace = null;
+3
View File
@@ -241,6 +241,9 @@
<metadata name="actionsStrip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>134, 54</value>
</metadata>
<metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>243, 54</value>
</metadata>
<metadata name="tabContextMenu.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>279, 17</value>
</metadata>
+9
View File
@@ -265,6 +265,12 @@
<Compile Include="Windows\PipelineState\PipelineStateViewer.Designer.cs">
<DependentUpon>PipelineStateViewer.cs</DependentUpon>
</Compile>
<Compile Include="Windows\PixelHistoryView.cs">
<SubType>Form</SubType>
</Compile>
<Compile Include="Windows\PixelHistoryView.Designer.cs">
<DependentUpon>PixelHistoryView.cs</DependentUpon>
</Compile>
<Compile Include="Windows\ShaderViewer.cs">
<SubType>Form</SubType>
</Compile>
@@ -355,6 +361,9 @@
<EmbeddedResource Include="Windows\PipelineState\PipelineStateViewer.resx">
<DependentUpon>PipelineStateViewer.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Windows\PixelHistoryView.resx">
<DependentUpon>PixelHistoryView.cs</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="Windows\ShaderViewer.resx">
<DependentUpon>ShaderViewer.cs</DependentUpon>
</EmbeddedResource>