mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-10-23 12:31:09 +00:00
Add some cross-linking for panels that view a single resource
* We add a button with a link icon to indicate that it goes to the resource details. We'll re-use the crosshair as a visual metaphor for any interactive widget that goes to the resource inspector. * To remove any possible confusion, we change the icon for the texture list and locked tabs in the texture viewer to not include the link.
This commit is contained in:
21 files changed
+110
-8
No files matched your search
@@ -61,11 +61,14 @@
|
||||
RESOURCE_DEF(hourglass, "hourglass.png") \
|
||||
RESOURCE_DEF(house, "house.png") \
|
||||
RESOURCE_DEF(information, "information.png") \
|
||||
RESOURCE_DEF(link, "link.png") \
|
||||
RESOURCE_DEF(page_go, "page_go.png") \
|
||||
RESOURCE_DEF(page_white_code, "page_white_code.png") \
|
||||
RESOURCE_DEF(page_white_database, "page_white_database.png") \
|
||||
RESOURCE_DEF(page_white_delete, "page_white_delete.png") \
|
||||
RESOURCE_DEF(page_white_edit, "page_white_edit.png") \
|
||||
RESOURCE_DEF(page_white_link, "page_white_link.png") \
|
||||
RESOURCE_DEF(page_white_stack, "page_white_stack.png") \
|
||||
RESOURCE_DEF(plugin_add, "plugin_add.png") \
|
||||
RESOURCE_DEF(save, "save.png") \
|
||||
RESOURCE_DEF(tick, "tick.png") \
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 649 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 674 B |
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 541 B |
Binary file not shown.
|
After Width: | Height: | Size: 960 B |
@@ -81,6 +81,10 @@
|
||||
<file>house@2x.png</file>
|
||||
<file>information.png</file>
|
||||
<file>information@2x.png</file>
|
||||
<file>link.png</file>
|
||||
<file>link@2x.png</file>
|
||||
<file>page_go.png</file>
|
||||
<file>page_go@2x.png</file>
|
||||
<file>page_white_code.png</file>
|
||||
<file>page_white_code@2x.png</file>
|
||||
<file>page_white_database.png</file>
|
||||
@@ -91,6 +95,8 @@
|
||||
<file>page_white_edit@2x.png</file>
|
||||
<file>page_white_link.png</file>
|
||||
<file>page_white_link@2x.png</file>
|
||||
<file>page_white_stack.png</file>
|
||||
<file>page_white_stack@2x.png</file>
|
||||
<file>plugin_add.png</file>
|
||||
<file>plugin_add@2x.png</file>
|
||||
<file>save.png</file>
|
||||
|
||||
@@ -1173,6 +1173,7 @@ void BufferViewer::SetupMeshView()
|
||||
ui->byteRangeLengthLabel->setVisible(false);
|
||||
ui->byteRangeLength->setVisible(false);
|
||||
|
||||
ui->resourceDetails->setVisible(false);
|
||||
ui->formatSpecifier->setVisible(false);
|
||||
ui->cameraControlsGroup->setVisible(false);
|
||||
|
||||
@@ -2633,6 +2634,16 @@ void BufferViewer::updateWindowTitle()
|
||||
setWindowTitle(m_Ctx.GetResourceName(m_BufferID) + lit(" - Contents"));
|
||||
}
|
||||
|
||||
void BufferViewer::on_resourceDetails_clicked()
|
||||
{
|
||||
if(!m_Ctx.HasResourceInspector())
|
||||
m_Ctx.ShowResourceInspector();
|
||||
|
||||
m_Ctx.GetResourceInspector()->Inspect(m_BufferID);
|
||||
|
||||
ToolWindowManager::raiseToolWindow(m_Ctx.GetResourceInspector()->Widget());
|
||||
}
|
||||
|
||||
void BufferViewer::render_mouseWheel(QWheelEvent *e)
|
||||
{
|
||||
if(m_CurrentCamera)
|
||||
|
||||
@@ -94,6 +94,7 @@ private slots:
|
||||
void on_autofitCamera_clicked();
|
||||
void on_toggleControls_toggled(bool checked);
|
||||
void on_syncViews_toggled(bool checked);
|
||||
void on_resourceDetails_clicked();
|
||||
void on_highlightVerts_toggled(bool checked);
|
||||
void on_wireframeRender_toggled(bool checked);
|
||||
void on_solidShading_currentIndexChanged(int index);
|
||||
|
||||
@@ -738,6 +738,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="resourceDetails">
|
||||
<property name="toolTip">
|
||||
<string>Open the currently buffer's resource details in the resource inspector</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../Resources/resources.qrc">
|
||||
<normaloff>:/link.png</normaloff>:/link.png</iconset>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="Line" name="offsetLine">
|
||||
<property name="orientation">
|
||||
|
||||
@@ -158,6 +158,16 @@ void ConstantBufferPreviewer::on_setFormat_toggled(bool checked)
|
||||
ui->splitter->handle(1)->setEnabled(true);
|
||||
}
|
||||
|
||||
void ConstantBufferPreviewer::on_resourceDetails_clicked()
|
||||
{
|
||||
if(!m_Ctx.HasResourceInspector())
|
||||
m_Ctx.ShowResourceInspector();
|
||||
|
||||
m_Ctx.GetResourceInspector()->Inspect(m_cbuffer);
|
||||
|
||||
ToolWindowManager::raiseToolWindow(m_Ctx.GetResourceInspector()->Widget());
|
||||
}
|
||||
|
||||
void ConstantBufferPreviewer::on_saveCSV_clicked()
|
||||
{
|
||||
QString filename = RDDialog::getSaveFileName(this, tr("Export buffer data as CSV"), QString(),
|
||||
|
||||
@@ -59,6 +59,7 @@ private slots:
|
||||
// automatic slots
|
||||
void on_setFormat_toggled(bool checked);
|
||||
void on_saveCSV_clicked();
|
||||
void on_resourceDetails_clicked();
|
||||
|
||||
// manual slots
|
||||
void processFormat(const QString &format);
|
||||
|
||||
@@ -164,6 +164,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="resourceDetails">
|
||||
<property name="toolTip">
|
||||
<string>Open the currently buffer's resource details in the resource inspector</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../Resources/resources.qrc">
|
||||
<normaloff>:/link.png</normaloff>:/link.png</iconset>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
|
||||
@@ -221,8 +221,9 @@ D3D11PipelineStateViewer::D3D11PipelineStateViewer(ICaptureContext &ctx,
|
||||
RDHeaderView *header = new RDHeaderView(Qt::Horizontal, this);
|
||||
samp->setHeader(header);
|
||||
|
||||
samp->setColumns({tr("Slot"), tr("Addressing"), tr("Filter"), tr("LOD Clamp"), tr("LOD Bias")});
|
||||
header->setColumnStretchHints({1, 2, 2, 2, 2});
|
||||
samp->setColumns({tr("Slot"), tr("Sampler"), tr("Addressing"), tr("Filter"), tr("LOD Clamp"),
|
||||
tr("LOD Bias")});
|
||||
header->setColumnStretchHints({2, 1, 4, 4, 4, 4});
|
||||
|
||||
samp->setClearSelectionOnFocusLoss(true);
|
||||
samp->setInstantTooltips(true);
|
||||
@@ -925,8 +926,7 @@ void D3D11PipelineStateViewer::setShaderState(const D3D11Pipe::Shader &stage, QL
|
||||
if(shaderInput && !shaderInput->name.empty())
|
||||
slotname += lit(": ") + shaderInput->name;
|
||||
|
||||
if(!m_Ctx.IsAutogeneratedName(s.Samp))
|
||||
slotname += QFormatStr(" = %1").arg(m_Ctx.GetResourceName(s.Samp));
|
||||
QString sampName = m_Ctx.GetResourceName(s.Samp);
|
||||
|
||||
QString borderColor = QFormatStr("%1, %2, %3, %4")
|
||||
.arg(s.BorderColor[0])
|
||||
@@ -976,7 +976,7 @@ void D3D11PipelineStateViewer::setShaderState(const D3D11Pipe::Shader &stage, QL
|
||||
filter = QFormatStr(" (%1)").arg(ToQStr(s.Filter.func));
|
||||
|
||||
RDTreeWidgetItem *node = new RDTreeWidgetItem(
|
||||
{slotname, addressing, filter,
|
||||
{slotname, sampName, addressing, filter,
|
||||
QFormatStr("%1 - %2")
|
||||
.arg(s.MinLOD == -FLT_MAX ? lit("0") : QString::number(s.MinLOD))
|
||||
.arg(s.MaxLOD == FLT_MAX ? lit("FLT_MAX") : QString::number(s.MaxLOD)),
|
||||
|
||||
@@ -1653,7 +1653,7 @@ void GLPipelineStateViewer::setState()
|
||||
}
|
||||
|
||||
if(tex->format.srgbCorrected && !state.m_FB.FramebufferSRGB)
|
||||
name += lit(" (GL_FRAMEBUFFER_SRGB = 0)");
|
||||
format += lit(" (GL_FRAMEBUFFER_SRGB = 0)");
|
||||
}
|
||||
|
||||
if(r && (r->Swizzle[0] != TextureSwizzle::Red || r->Swizzle[1] != TextureSwizzle::Green ||
|
||||
|
||||
@@ -1724,7 +1724,7 @@ void TextureViewer::ViewTexture(ResourceId ID, bool focus)
|
||||
int idx = textureTabs->indexOf(lockedContainer);
|
||||
|
||||
if(idx >= 0)
|
||||
textureTabs->setTabIcon(idx, Icons::page_white_link());
|
||||
textureTabs->setTabIcon(idx, Icons::page_go());
|
||||
else
|
||||
qCritical() << "Couldn't get tab index of new tab to set icon";
|
||||
|
||||
@@ -3290,6 +3290,21 @@ void TextureViewer::on_viewTexBuffer_clicked()
|
||||
}
|
||||
}
|
||||
|
||||
void TextureViewer::on_resourceDetails_clicked()
|
||||
{
|
||||
TextureDescription *texptr = GetCurrentTexture();
|
||||
|
||||
if(texptr)
|
||||
{
|
||||
if(!m_Ctx.HasResourceInspector())
|
||||
m_Ctx.ShowResourceInspector();
|
||||
|
||||
m_Ctx.GetResourceInspector()->Inspect(texptr->ID);
|
||||
|
||||
ToolWindowManager::raiseToolWindow(m_Ctx.GetResourceInspector()->Widget());
|
||||
}
|
||||
}
|
||||
|
||||
void TextureViewer::on_saveTex_clicked()
|
||||
{
|
||||
TextureDescription *texptr = GetCurrentTexture();
|
||||
|
||||
@@ -161,6 +161,7 @@ private slots:
|
||||
|
||||
void on_locationGoto_clicked();
|
||||
void on_viewTexBuffer_clicked();
|
||||
void on_resourceDetails_clicked();
|
||||
void on_texListShow_clicked();
|
||||
void on_saveTex_clicked();
|
||||
void on_debugPixelContext_clicked();
|
||||
|
||||
@@ -481,7 +481,7 @@
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../Resources/resources.qrc">
|
||||
<normaloff>:/page_white_link.png</normaloff>:/page_white_link.png</iconset>
|
||||
<normaloff>:/page_white_stack.png</normaloff>:/page_white_stack.png</iconset>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
@@ -522,6 +522,20 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="resourceDetails">
|
||||
<property name="toolTip">
|
||||
<string>Open the currently visible resource's details in the resource inspector</string>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../Resources/resources.qrc">
|
||||
<normaloff>:/link.png</normaloff>:/link.png</iconset>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QFrame" name="subresourceToolbar">
|
||||
|
||||
@@ -1499,10 +1499,13 @@
|
||||
<None Include="Resources\icon.ico" />
|
||||
<None Include="Resources\information.png" />
|
||||
<None Include="Resources\new_window.png" />
|
||||
<None Include="Resources\link.png" />
|
||||
<None Include="Resources\page_white_database.png" />
|
||||
<None Include="Resources\page_white_delete.png" />
|
||||
<None Include="Resources\page_white_edit.png" />
|
||||
<None Include="Resources\page_white_go.png" />
|
||||
<None Include="Resources\page_white_link.png" />
|
||||
<None Include="Resources\page_white_stack.png" />
|
||||
<None Include="Resources\plugin_add.png" />
|
||||
<None Include="Resources\red_x_16.png" />
|
||||
<CustomBuild Include="Resources\resources.qrc">
|
||||
|
||||
@@ -1087,6 +1087,9 @@
|
||||
<None Include="Resources\information.png">
|
||||
<Filter>Resources\Files</Filter>
|
||||
</None>
|
||||
<None Include="Resources\link.png">
|
||||
<Filter>Resources\Files</Filter>
|
||||
</None>
|
||||
<None Include="Resources\new_window.png">
|
||||
<Filter>Resources\Files</Filter>
|
||||
</None>
|
||||
@@ -1099,9 +1102,15 @@
|
||||
<None Include="Resources\page_white_edit.png">
|
||||
<Filter>Resources\Files</Filter>
|
||||
</None>
|
||||
<None Include="Resources\page_white_go.png">
|
||||
<Filter>Resources\Files</Filter>
|
||||
</None>
|
||||
<None Include="Resources\page_white_link.png">
|
||||
<Filter>Resources\Files</Filter>
|
||||
</None>
|
||||
<None Include="Resources\page_white_stack.png">
|
||||
<Filter>Resources\Files</Filter>
|
||||
</None>
|
||||
<None Include="Resources\plugin_add.png">
|
||||
<Filter>Resources\Files</Filter>
|
||||
</None>
|
||||
|
||||
Reference in new issue
Block a user