| 298 | } |
| 299 | |
| 300 | PluginOpenGLRenderSupport |
| 301 | Node::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 | |
| 332 | void |
| 333 | Node::setCurrentSequentialRenderSupport(SequentialPreferenceEnum support) |
no test coverage detected