virtual void onPvdSendClassDescriptions( physx::debugger::comm::PvdConnection& inFactory ) { using namespace physx::debugger; //register the joint classes. PvdDataStream* connection = &inFactory.createDataStream(); connection->addRef(); Ext::VisualDebugger::sendClassDescriptions( *connection ); connection->flush(); connection->release(); }
void onPvdConnected() { PvdDataStream* stream = PvdDataStream::create(mPvd); if(stream) { mConnected = true; Ext::Pvd::sendClassDescriptions(*stream); stream->release(); } }
bool PvdImpl::connect(PxPvdTransport& transport, PxPvdInstrumentationFlags flags) { if(mIsConnected) { physx::shdfnd::getFoundation().error(PxErrorCode::eINVALID_PARAMETER, __FILE__, __LINE__, "PxPvd::connect - recall connect! Should call disconnect before re-connect."); return false; } mFlags = flags; mPvdTransport = &transport; mIsConnected = mPvdTransport->connect(); if(mIsConnected) { mSharedMetaProvider = PVD_NEW(MetaDataProvider); sendTransportInitialization(); PvdDataStream* stream = PvdDataStream::create(this); initializeModelTypes(*stream); stream->release(); if(mFlags & PxPvdInstrumentationFlag::eMEMORY) { mMemClient = PVD_NEW(PvdMemClient)(*this); mPvdClients.pushBack(mMemClient); } if((mFlags & PxPvdInstrumentationFlag::ePROFILE) && mProfileZoneManager) { mPvdClients.pushBack(mProfileClient); mProfileZone = &physx::profile::PxProfileZone::createProfileZone(&physx::shdfnd::getAllocator(),gSdkName,gProfileNameProvider.getProfileNames()); } for(uint32_t i = 0; i < mPvdClients.size(); i++) mPvdClients[i]->onPvdConnected(); if (mProfileZone) { mProfileZoneManager->addProfileZoneHandler(*mProfileClient); mProfileZoneManager->addProfileZone( *mProfileZone ); } if ((mFlags & PxPvdInstrumentationFlag::ePROFILE)) { PxSetProfilerCallback(this); } } return mIsConnected; }