| 1021 | } |
| 1022 | |
| 1023 | PluginOpenGLRenderSupport |
| 1024 | Node::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 | |
| 1055 | void |
| 1056 | Node::setCurrentSequentialRenderSupport(SequentialPreferenceEnum support) |
no test coverage detected