Ejemplo n.º 1
0
void CeguiDrawable::addEvent(const osgGA::GUIEventAdapter& e)
{
    /*if (e.getEventType() & (osgGA::GUIEventAdapter::RELEASE | osgGA::GUIEventAdapter::PUSH))
    {
        passEvent(e);
        return;
    }*/
    // Yep OSG does multi threaded render by default in my case.
    // So this sync is vital.
    m_eventMutex.lock();
    m_eventQueue.push_back(static_cast<osgGA::GUIEventAdapter*>(e.clone(osg::CopyOp::DEEP_COPY_ALL)));
    m_eventMutex.unlock();
}