Jump to content
  • Advertisement
Sign in to follow this  


This topic is 1477 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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;
return false;

Share this post

Link to post
Share on other sites

The libraries were most likely created with different version of the C-runtime..its never a good idea to mix and match the 2..

Share this post

Link to post
Share on other sites
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!