| 386 | | unsigned int unique_context_id = GlDrawManager::instance()->getCurrentContext(); |
|---|
| | 390 | // Tell osg::Referenced to use thread-safe reference counting if we detect |
|---|
| | 391 | // that there is more than one rendering thread. The means by which we make |
|---|
| | 392 | // this determination is less than ideal, but the dynamic configuration |
|---|
| | 393 | // aspect of VR Juggler makes this one of the safer options that we have. |
|---|
| | 394 | // Nevertheless, this is still a hack, and it should not be mimicked. You |
|---|
| | 395 | // have been warned! |
|---|
| | 396 | mThreadIDs.insert(vpr::Thread::self()->getTID()); |
|---|
| | 397 | osg::Referenced::setThreadSafeReferenceCounting(mThreadIDs.size() > 1); |
|---|
| | 398 | |
|---|
| | 399 | const unsigned int unique_context_id = |
|---|
| | 400 | GlDrawManager::instance()->getCurrentContext(); |
|---|