Hi There! I'm just starting to develop with APEX and I'm getting an access violation error with NxCreateApexSDK! Any help or example is appreciated. Here is my initialization code:
//Creating foundation for PhysX
PxFoundation* foundation = PxCreateFoundation(PX_PHYSICS_VERSION, gDefaultAllocatorCallback, gDefaultErrorCallback);
if (foundation == nullptr)return false;
//Creating instance of PhysX SDK
gPhysicsSDK = PxCreatePhysics(PX_PHYSICS_VERSION, *foundation, PxTolerancesScale());
if (gPhysicsSDK == nullptr)return false;
//Creating cooking interface
mPhysxCooking = PxCreateCooking(PX_PHYSICS_VERSION,*foundation, PxCookingParams(gPhysicsSDK->getTolerancesScale()));
if (mPhysxCooking == nullptr)return false;
// Init Physx extensions
if (!PxInitExtensions(*gPhysicsSDK))return false;
//Creating instance of Apex SDK
ZeusResourceCallback* rcallback = new ZeusResourceCallback(); // https://github.com/clucasa/Olympus/blob/master/Olympus/ZeusResourceCallback.h
physx::apex::NxUserRenderResourceManager* mRenderResourceManager;
mRenderResourceManager = new NullRenderResourceManager(); // From shared/external/NullRenderer.h (Included with apex)
NxApexSDKDesc apexDesc;
apexDesc.physXSDK = gPhysicsSDK;
apexDesc.cooking = mPhysxCooking;
apexDesc.renderResourceManager = mRenderResourceManager;
apexDesc.resourceCallback = rcallback;
if (apexDesc.isValid())
{
NxApexCreateError errorCode;
gApexSDK = NxCreateApexSDK(apexDesc, &errorCode); // <- Here is where I get the access violation
if (gApexSDK == nullptr)return false;
}
else
return false;