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

Method getCurrentOpenGLRenderSupport

Engine/Node.cpp:300–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

298}
299
300PluginOpenGLRenderSupport
301Node::getCurrentOpenGLRenderSupport() const
302{
303
304 if (_imp->plugin) {
305 PluginOpenGLRenderSupport pluginProp = _imp->plugin->getPluginOpenGLRenderSupport();
306 if (pluginProp != ePluginOpenGLRenderSupportYes) {
307 return pluginProp;
308 }
309 }
310
311 if (!getApp()->getProject()->isGPURenderingEnabledInProject()) {
312 return ePluginOpenGLRenderSupportNone;
313 }
314
315 // Ok still turned on, check the value of the opengl support knob in the Node page
316 KnobChoicePtr openglSupportKnob = _imp->openglRenderingEnabledKnob.lock();
317 if (openglSupportKnob) {
318 int index = openglSupportKnob->getValue();
319 if (index == 1) {
320 return ePluginOpenGLRenderSupportNone;
321 } else if (index == 2 && getApp()->isBackground()) {
322 return ePluginOpenGLRenderSupportNone;
323 }
324 }
325
326 // Descriptor returned that it supported OpenGL, let's see if it turned off/on in the instance the OpenGL rendering
327 QMutexLocker k(&_imp->pluginsPropMutex);
328
329 return _imp->currentSupportOpenGLRender;
330}
331
332void
333Node::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