MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / refreshOpenGLRenderingFlagOnNodes

Method refreshOpenGLRenderingFlagOnNodes

Engine/Project.cpp:1740–1756  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1738} // Project::onKnobValueChanged
1739
1740void
1741Project::refreshOpenGLRenderingFlagOnNodes()
1742{
1743 bool activated = appPTR->getCurrentSettings()->isOpenGLRenderingEnabled();
1744 if (!activated) {
1745 _imp->gpuSupport->setAllDimensionsEnabled(false);
1746 } else {
1747 _imp->gpuSupport->setAllDimensionsEnabled(true);
1748 int index = _imp->gpuSupport->getValue();
1749 activated = index == 0 || (index == 2 && !getApp()->isBackground());
1750 }
1751 NodesList allNodes;
1752 getNodes_recursive(allNodes, false);
1753 for (NodesList::iterator it = allNodes.begin(); it!=allNodes.end(); ++it) {
1754 (*it)->onOpenGLEnabledKnobChangedOnProject(activated);
1755 }
1756}
1757
1758bool
1759Project::isLoadingProject() const

Calls 9

getAppFunction · 0.85
getCurrentSettingsMethod · 0.80
getValueMethod · 0.45
isBackgroundMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected