mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-06 01:50:38 +00:00
Add a "load texture as a buffer view" button. Refs #141
* This isn't a complete fix as the buffer gridview doesn't support 100s or 1000s of columns, but it's a start and could be useful in some cases.
This commit is contained in:
+11
-1
@@ -1,7 +1,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.18444
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
@@ -320,6 +320,16 @@ namespace renderdocui.Properties {
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
internal static System.Drawing.Bitmap page_white_code {
|
||||
get {
|
||||
object obj = ResourceManager.GetObject("page_white_code", resourceCulture);
|
||||
return ((System.Drawing.Bitmap)(obj));
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized resource of type System.Drawing.Bitmap.
|
||||
/// </summary>
|
||||
|
||||
@@ -283,4 +283,7 @@
|
||||
<data name="folder_page" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\folder_page.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
<data name="page_white_code" type="System.Resources.ResXFileRef, System.Windows.Forms">
|
||||
<value>..\Resources\page_white_code.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a</value>
|
||||
</data>
|
||||
</root>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 603 B |
+14
-1
@@ -147,6 +147,7 @@
|
||||
this.pixelContextMenu = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.highlightedPixelHistoryToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.highlightedPixelDebugToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.viewTexBuffer = new System.Windows.Forms.ToolStripButton();
|
||||
subSep = new System.Windows.Forms.ToolStripSeparator();
|
||||
toolStripLabel2 = new System.Windows.Forms.ToolStripLabel();
|
||||
toolStripLabel3 = new System.Windows.Forms.ToolStripLabel();
|
||||
@@ -976,7 +977,8 @@
|
||||
this.actionsStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
toolStripLabel1,
|
||||
this.saveTex,
|
||||
this.texListShow});
|
||||
this.texListShow,
|
||||
this.viewTexBuffer});
|
||||
this.actionsStrip.Location = new System.Drawing.Point(0, 25);
|
||||
this.actionsStrip.Margin = new System.Windows.Forms.Padding(0, 0, 12, 0);
|
||||
this.actionsStrip.Name = "actionsStrip";
|
||||
@@ -1304,6 +1306,16 @@
|
||||
this.highlightedPixelDebugToolStripMenuItem.Text = "Highlighted Pixel &Debug";
|
||||
this.highlightedPixelDebugToolStripMenuItem.Click += new System.EventHandler(this.debugPixel_Click);
|
||||
//
|
||||
// viewTexBuffer
|
||||
//
|
||||
this.viewTexBuffer.DisplayStyle = System.Windows.Forms.ToolStripItemDisplayStyle.Image;
|
||||
this.viewTexBuffer.Image = global::renderdocui.Properties.Resources.page_white_code;
|
||||
this.viewTexBuffer.ImageTransparentColor = System.Drawing.Color.Magenta;
|
||||
this.viewTexBuffer.Name = "viewTexBuffer";
|
||||
this.viewTexBuffer.Size = new System.Drawing.Size(23, 22);
|
||||
this.viewTexBuffer.Text = "Open Texture as Buffer";
|
||||
this.viewTexBuffer.Click += new System.EventHandler(this.viewTexBuffer_Click);
|
||||
//
|
||||
// TextureViewer
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
@@ -1464,6 +1476,7 @@
|
||||
private System.Windows.Forms.ContextMenuStrip pixelContextMenu;
|
||||
private System.Windows.Forms.ToolStripMenuItem highlightedPixelHistoryToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripMenuItem highlightedPixelDebugToolStripMenuItem;
|
||||
private System.Windows.Forms.ToolStripButton viewTexBuffer;
|
||||
|
||||
}
|
||||
}
|
||||
@@ -3382,6 +3382,13 @@ namespace renderdocui.Windows
|
||||
}));
|
||||
}
|
||||
|
||||
private void viewTexBuffer_Click(object sender, EventArgs e)
|
||||
{
|
||||
var viewer = new BufferViewer(m_Core, false);
|
||||
viewer.ViewRawBuffer(false, CurrentTexture.ID);
|
||||
viewer.Show(this.DockPanel);
|
||||
}
|
||||
|
||||
private TextureSaveDialog m_SaveDialog = null;
|
||||
|
||||
private void saveTex_Click(object sender, EventArgs e)
|
||||
|
||||
@@ -529,6 +529,7 @@
|
||||
<None Include="Resources\asterisk_orange.png" />
|
||||
<None Include="Resources\folder_page.png" />
|
||||
<EmbeddedResource Include="Resources\glsl.xml" />
|
||||
<None Include="Resources\page_white_code.png" />
|
||||
<Content Include="Resources\RightArrow_Green_16x16.png" />
|
||||
<Content Include="Resources\icon.ico" />
|
||||
<None Include="Resources\page_white_delete.png" />
|
||||
|
||||
Reference in New Issue
Block a user