Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change defaults to turn off shadows, depth blur, and edge #512

Merged
merged 1 commit into from
Oct 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions avogadro/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -388,15 +388,15 @@ void MainWindow::setupInterface()
Rendering::SolidPipeline* pipeline = &glWidget->renderer().solidPipeline();
if (pipeline) {
pipeline->setAoEnabled(
settings.value("MainWindow/ao_enabled", true).toBool());
settings.value("MainWindow/ao_enabled", false).toBool());
pipeline->setDofEnabled(
settings.value("MainWindow/dof_enabled", true).toBool());
settings.value("MainWindow/dof_enabled", false).toBool());
pipeline->setFogEnabled(
settings.value("MainWindow/fog_enabled", true).toBool());
pipeline->setAoStrength(
settings.value("MainWindow/ao_strength", 1.0f).toFloat());
pipeline->setEdEnabled(
settings.value("MainWindow/ed_enabled", true).toBool());
settings.value("MainWindow/ed_enabled", false).toBool());
}

// Our tool dock.
Expand Down Expand Up @@ -1812,7 +1812,7 @@ void MainWindow::setBackgroundColor()
GLWidget* glWidget(nullptr);
if ((glWidget = qobject_cast<GLWidget*>(m_multiViewWidget->activeWidget())))
scene = &glWidget->renderer().scene();
pipeline = &glWidget->renderer().solidPipeline();
pipeline = &glWidget->renderer().solidPipeline();
if (scene) {
Vector4ub cColor = scene->backgroundColor();
QColor qtColor(cColor[0], cColor[1], cColor[2], cColor[3]);
Expand All @@ -1823,7 +1823,7 @@ void MainWindow::setBackgroundColor()
cColor[2] = static_cast<unsigned char>(color.blue());
cColor[3] = static_cast<unsigned char>(color.alpha());
scene->setBackgroundColor(cColor);
if(pipeline)
if (pipeline)
pipeline->setBackgroundColor(cColor);
if (glWidget)
glWidget->update();
Expand All @@ -1847,7 +1847,7 @@ void MainWindow::setRenderingSettings()
settings.setValue("MainWindow/ao_enabled", pipeline->getAoEnabled());
settings.setValue("MainWindow/ao_strength", pipeline->getAoStrength());
settings.setValue("MainWindow/dof_enabled", pipeline->getDofEnabled());
settings.setValue("MainWindow/fog_enabled", pipeline->getFogEnabled());
settings.setValue("MainWindow/fog_enabled", pipeline->getFogEnabled());
settings.setValue("MainWindow/ed_enabled", pipeline->getEdEnabled());
}
}
Expand Down
Loading