Add option to make y-flipping a per-texture state instead of global

This commit is contained in:
baldurk
2019-02-04 18:06:10 +00:00
parent 2853029847
commit f20e871510
7 changed files with 77 additions and 1 deletions
@@ -108,10 +108,13 @@ SettingsDialog::SettingsDialog(ICaptureContext &ctx, QWidget *parent)
ui->TextureViewer_ResetRange->setChecked(m_Ctx.Config().TextureViewer_ResetRange);
ui->TextureViewer_PerTexSettings->setChecked(m_Ctx.Config().TextureViewer_PerTexSettings);
ui->TextureViewer_PerTexYFlip->setChecked(m_Ctx.Config().TextureViewer_PerTexYFlip);
ui->ShaderViewer_FriendlyNaming->setChecked(m_Ctx.Config().ShaderViewer_FriendlyNaming);
ui->CheckUpdate_AllowChecks->setChecked(m_Ctx.Config().CheckUpdate_AllowChecks);
ui->Font_PreferMonospaced->setChecked(m_Ctx.Config().Font_PreferMonospaced);
ui->TextureViewer_PerTexYFlip->setEnabled(ui->TextureViewer_PerTexSettings->isChecked());
ui->AlwaysReplayLocally->setChecked(m_Ctx.Config().AlwaysReplayLocally);
#if RENDERDOC_ANALYTICS_ENABLE
@@ -422,6 +425,15 @@ void SettingsDialog::on_TextureViewer_PerTexSettings_toggled(bool checked)
{
m_Ctx.Config().TextureViewer_PerTexSettings = ui->TextureViewer_PerTexSettings->isChecked();
ui->TextureViewer_PerTexYFlip->setEnabled(ui->TextureViewer_PerTexSettings->isChecked());
m_Ctx.Config().Save();
}
void SettingsDialog::on_TextureViewer_PerTexYFlip_toggled(bool checked)
{
m_Ctx.Config().TextureViewer_PerTexYFlip = ui->TextureViewer_PerTexYFlip->isChecked();
m_Ctx.Config().Save();
}
@@ -76,6 +76,7 @@ private slots:
// texture viewer
void on_TextureViewer_PerTexSettings_toggled(bool checked);
void on_TextureViewer_ResetRange_toggled(bool checked);
void on_TextureViewer_PerTexYFlip_toggled(bool checked);
// shader viewer
void on_ShaderViewer_FriendlyNaming_toggled(bool checked);
+33 -1
View File
@@ -631,14 +631,46 @@ After interop is enabled you will need to reload any capture.</string>
</size>
</property>
<property name="toolTip">
<string>The visible channels (RGBA) and selected mip/slice are remembered and restored per-texture.</string>
<string>Settings such as visible channels (RGBA) and selected mip/slice are remembered and restored per-texture.</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="2" column="0">
<widget class="QLabel" name="label_13">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="toolTip">
<string>Y-flipping state is remembered and restored per-texture, rather than treated as a global toggle.</string>
</property>
<property name="text">
<string>Y-flipping state saved per-texture</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QCheckBox" name="TextureViewer_PerTexYFlip">
<property name="minimumSize">
<size>
<width>50</width>
<height>0</height>
</size>
</property>
<property name="toolTip">
<string>Y-flipping state is remembered and restored per-texture, rather than treated as a global toggle.</string>
</property>
<property name="text">
<string/>
</property>
</widget>
</item>
<item row="3" column="1">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>