Skip to content

Commit

Permalink
Change defaults to turn off shadows, depth blur, and edge
Browse files Browse the repository at this point in the history
Should generally improve speed

Signed-off-by: Geoff Hutchison <[email protected]>
  • Loading branch information
ghutchis committed Oct 14, 2024
1 parent e79e158 commit 0e4df0a
Showing 1 changed file with 6 additions and 6 deletions.
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

0 comments on commit 0e4df0a

Please sign in to comment.