ContextData* getContextData(osg::GraphicsContext* gc) const { OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex); osg::ref_ptr<ContextData>& data = _contextDataMap[gc]; if (!data) data = createContextData(gc); return data.get(); }
WindowCaptureCallback::ContextData* WindowCaptureCallback::getContextData(osg::GraphicsContext* gc) const { #ifndef EMSCRIPTEN OpenThreads::ScopedLock<OpenThreads::Mutex> lock(_mutex); #endif //EMSCRIPTEN osg::ref_ptr<ContextData>& data = _contextDataMap[gc]; if (!data) data = createContextData(gc); return data.get(); }