| 104 | | { |
| 105 | | if (!_initialized) |
| 106 | | { |
| 107 | | // only initialize state once, only need for cases where multiple graphics contexts are |
| 108 | | // if which case this callback can get called multiple times. |
| 109 | | _initialized = true; |
| 110 | | |
| 111 | | if (_node) _node->setStateSet(constructState()); |
| 112 | | } |
| | 104 | { |
| | 105 | { |
| | 106 | OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex); |
| | 107 | |
| | 108 | if (!_initialized) |
| | 109 | { |
| | 110 | |
| | 111 | // only initialize state once, only need for cases where multiple graphics contexts are |
| | 112 | // if which case this callback can get called multiple times. |
| | 113 | _initialized = true; |
| | 114 | |
| | 115 | if (_node) _node->setStateSet(constructState()); |
| | 116 | } |
| | 117 | |
| | 118 | } |
| | 119 | |