Skip to content

Commit

Permalink
Merge pull request #512 from ghutchis/fast-rendering-default
Browse files Browse the repository at this point in the history
Change defaults to turn off shadows, depth blur, and edge
  • Loading branch information
ghutchis authored Oct 15, 2024
2 parents 3d5a982 + 0e4df0a commit 830a8d2
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 830a8d2

Please sign in to comment.