Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdlib>
- #define NDEBUG
- #define PX_WINDOWS
- #include <PxPhysicsAPI.h>
- using namespace std;
- using namespace physx;
- static PxPhysics* gPhysicsSDK = NULL;
- PxDefaultErrorCallback gDefaultErrorCallback;
- static PxDefaultAllocator gDefaultAllocatorCallback;
- void fatalError(string error) {
- std::cout << error << std::endl;
- exit(1);
- }
- void InitializePhysX() {
- PxFoundation* mFoundation = PxCreateFoundation(PX_PHYSICS_VERSION, gDefaultAllocatorCallback, gDefaultErrorCallback);
- if(!mFoundation)
- fatalError("PxCreateFoundation failed!");
- }
- void ShutdownPhysX() {
- //gPhysicsSDK->release();
- }
- void InitGL() {
- }
- void OnShutdown() {
- ShutdownPhysX();
- }
- int main(int argc, char** argv) {
- atexit(OnShutdown);
- InitializePhysX();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement