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

This commit is contained in:
baldurk
2019-02-04 14:42:56 +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();
}