alienskull
08-11-2007 00:29:00
NxOgre::SceneParams sceneParams;
sceneParams.setToDefault();
if ( ??? )
sceneParams.sim_type = NX_SIMULATION_HW;
physicsScene = new NxOgre::Scene("defaultScene", sceneMgr, physicsWorld, sceneParams);
Please help me fill in the blank...
How can I tell if there is a card in the PC?
alienskull
08-11-2007 00:32:46
I think I solved it!
physicsWorld->getPhysXDriver()->hasHardware()
thanks alienSkull.. I don't know what I would do without you... you idiot
alienskull
08-11-2007 00:46:34
ok almost there...
error LNK2001: unresolved external symbol "__declspec(dllimport) public: bool __thiscall NxOgre::PhysXDriver::hasHardware(void)" (__imp_?hasHardware@PhysXDriver@NxOgre@@QAE_NXZ)
what lib/dll do i need in order to call:
physicsWorld->getPhysXDriver()->hasHardware() ;
Horizon
08-11-2007 07:47:01
Or just try to create a hardware scene. If (!physicsScene) try again with a software scene.
betajaen
08-11-2007 09:03:39
Hmm, Missing function.
Try this:
bool IsPhysXHardwarePresent() {
mWorld->getPhysXDriver()->getSDK()->getHWVersion() != NX_HW_VERSION_NONE;
}
alienskull
08-11-2007 12:29:10
Yes, that worked. Thanks betajean!
I'm curious, is that function going to be implemented in the next release of NxOgre? I would prefer to use that method, even if it is the same thing in the end.
edit: well I did it for you.. in 'NxOgrePhysXDriver.cpp' add:
bool PhysXDriver::hasHardware() {
if ( mSDK->getHWVersion() == NX_HW_VERSION_NONE )
return false;
else
return true;
}