mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-26 16:36:31 +00:00
Hide/disable options when they're not available. Refs #788
* Hopefully these can be restored at some point, when the features are implemented. For now where possible we remove options that are just unavailable always, and selectively disable others when they may or may not be available based on what API the capture uses.
This commit is contained in:
@@ -1263,7 +1263,7 @@ void BufferViewer::stageRowMenu(MeshDataStage stage, QMenu *menu, const QPoint &
|
||||
|
||||
menu->clear();
|
||||
|
||||
if(m_MeshView && stage != MeshDataStage::GSOut)
|
||||
if(m_MeshView && stage != MeshDataStage::GSOut && m_Ctx.CurPipelineState().IsLogD3D11())
|
||||
{
|
||||
menu->addAction(m_DebugVert);
|
||||
menu->addSeparator();
|
||||
|
||||
@@ -59,6 +59,12 @@ MainWindow::MainWindow(ICaptureContext &ctx) : QMainWindow(NULL), ui(new Ui::Mai
|
||||
{
|
||||
ui->setupUi(this);
|
||||
|
||||
#if !defined(Q_OS_WIN32)
|
||||
// process injection is not supported on non-Windows, so remove the menu item rather than disable
|
||||
// it without a clear way to communicate that it is never supported
|
||||
ui->menu_File->removeAction(ui->action_Inject_into_Process);
|
||||
#endif
|
||||
|
||||
QToolTip::setPalette(palette());
|
||||
|
||||
installEventFilter(this);
|
||||
|
||||
@@ -2491,6 +2491,28 @@ void TextureViewer::OnLogfileLoaded()
|
||||
ui->locationGoto->setEnabled(true);
|
||||
ui->viewTexBuffer->setEnabled(true);
|
||||
|
||||
if(m_Ctx.CurPipelineState().IsLogD3D11())
|
||||
{
|
||||
ui->pixelHistory->setEnabled(true);
|
||||
ui->pixelHistory->setToolTip(QString());
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->pixelHistory->setEnabled(false);
|
||||
ui->pixelHistory->setToolTip(tr("Pixel History not implemented on this API"));
|
||||
}
|
||||
|
||||
if(m_Ctx.CurPipelineState().IsLogD3D11())
|
||||
{
|
||||
ui->debugPixelContext->setEnabled(true);
|
||||
ui->debugPixelContext->setToolTip(QString());
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->debugPixelContext->setEnabled(false);
|
||||
ui->debugPixelContext->setToolTip(tr("Shader Debugging not implemented on this API"));
|
||||
}
|
||||
|
||||
TextureListItemModel *model = (TextureListItemModel *)ui->textureList->model();
|
||||
|
||||
model->reset(TextureListItemModel::String, QString(), m_Ctx);
|
||||
@@ -2545,7 +2567,10 @@ void TextureViewer::Reset()
|
||||
ui->renderHScroll->setEnabled(false);
|
||||
ui->renderVScroll->setEnabled(false);
|
||||
|
||||
// PixelPicked = false;
|
||||
ui->pixelHistory->setEnabled(false);
|
||||
ui->pixelHistory->setToolTip(QString());
|
||||
ui->debugPixelContext->setEnabled(false);
|
||||
ui->debugPixelContext->setToolTip(QString());
|
||||
|
||||
ui->statusText->setText(QString());
|
||||
ui->renderContainer->setWindowTitle(tr("Current"));
|
||||
|
||||
Reference in New Issue
Block a user