void VisualDebugger::onPvdConnected( physx::debugger::comm::PvdConnection& inFactory ) { if(!mPvdConnection) return; updateScenesPvdConnection(); sendEntireSDK(); }
void VisualDebugger::onPvdConnected( physx::debugger::comm::PvdConnection& /*inFactory */) { if(!mPvdDataStream) return; updateScenesPvdConnection(); sendEntireSDK(); Ps::atomicExchange(&mIsConnected, 1); }
void VisualDebugger::onPvdDisconnected( physx::debugger::comm::PvdConnection& inFactory ) { if(mPvdConnection) { // NpPhysics& npPhysics = NpPhysics::getInstance(); if(mPvdConnection->isConnected()) { mPvdConnection->destroyInstance(&NpPhysics::getInstance()); mPvdConnection->flush(); } mPvdConnection->release(); mPvdConnection = NULL; mPvdConnectionFactory = NULL; updateScenesPvdConnection(); mRefCountMapLock.lock(); mRefCountMap.clear(); mRefCountMapLock.unlock(); } }
void VisualDebugger::onPvdDisconnected( physx::debugger::comm::PvdConnection& /*inFactory */) { Ps::atomicExchange(&mIsConnected, 0); if(mPvdDataStream) { // NpPhysics& npPhysics = NpPhysics::getInstance(); if(mPvdDataStream->isConnected()) { mPvdDataStream->destroyInstance(&NpPhysics::getInstance()); mPvdDataStream->flush(); } mPvdDataStream->release(); mPvdDataStream = NULL; mPvdConnection = NULL; updateScenesPvdConnection(); mRefCountMapLock.lock(); mRefCountMap.clear(); mRefCountMapLock.unlock(); } }
void VisualDebugger::onPvdDisconnected( PVD::PvdConnection* inFactory ) { if(mPvdConnection) { NpPhysics& npPhysics = NpPhysics::getInstance(); if(mPvdConnection->isConnected()) { releaseGroups(); mPvdConnection->destroyInstance(PX_PROFILE_POINTER_TO_U64(&NpPhysics::getInstance())); mPvdConnection->flush(); } mPvdConnection->release(); mPvdConnection = NULL; mPvdConnectionFactory->release(); mPvdConnectionFactory = NULL; updateScenesPvdConnection(); mRefCountMapLock.lock(); mRefCountMap.clear(); mRefCountMapLock.unlock(); } }
void VisualDebugger::onPvdConnected( PVD::PvdConnection* inFactory ) { PVD::PvdConnection* cf( inFactory ); if(!cf) return; if(mPvdConnection && mPvdConnectionFactory) disconnect(); mPvdConnectionFactory = cf; mPvdConnection = mPvdConnectionFactory->createDataStream(); if(!mPvdConnection) return; mPvdConnectionFactory->addRef(); mPvdConnection->addRef(); mPvdConnection->setNamespace( getPhysxNamespace() ); updateScenesPvdConnection(); sendClassDescriptions(); sendEntireSDK(); }