MCPcopy Create free account
hub / github.com/MrKepzie/Natron / getCurrentOpenGLRenderSupport

Method getCurrentOpenGLRenderSupport

Engine/Node.cpp:1023–1053  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1021}
1022
1023PluginOpenGLRenderSupport
1024Node::getCurrentOpenGLRenderSupport() const
1025{
1026
1027 if (_imp->plugin) {
1028 PluginOpenGLRenderSupport pluginProp = _imp->plugin->getPluginOpenGLRenderSupport();
1029 if (pluginProp != ePluginOpenGLRenderSupportYes) {
1030 return pluginProp;
1031 }
1032 }
1033
1034 if (!getApp()->getProject()->isGPURenderingEnabledInProject()) {
1035 return ePluginOpenGLRenderSupportNone;
1036 }
1037
1038 // Ok still turned on, check the value of the opengl support knob in the Node page
1039 boost::shared_ptr<KnobChoice> openglSupportKnob = _imp->openglRenderingEnabledKnob.lock();
1040 if (openglSupportKnob) {
1041 int index = openglSupportKnob->getValue();
1042 if (index == 1) {
1043 return ePluginOpenGLRenderSupportNone;
1044 } else if (index == 2 && getApp()->isBackground()) {
1045 return ePluginOpenGLRenderSupportNone;
1046 }
1047 }
1048
1049 // Descriptor returned that it supported OpenGL, let's see if it turned off/on in the instance the OpenGL rendering
1050 QMutexLocker k(&_imp->pluginsPropMutex);
1051
1052 return _imp->currentSupportOpenGLRender;
1053}
1054
1055void
1056Node::setCurrentSequentialRenderSupport(SequentialPreferenceEnum support)

Callers 2

Calls 7

getAppFunction · 0.85
getProjectMethod · 0.80
lockMethod · 0.45
getValueMethod · 0.45
isBackgroundMethod · 0.45

Tested by

no test coverage detected