Advertisement
Guest User

PhysX 3 - Failing code by das_j

a guest
Feb 24th, 2013
41
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.81 KB | None | 0 0
  1. #include <iostream>
  2. #include <cstdlib>
  3.  
  4. #define NDEBUG
  5. #define PX_WINDOWS
  6.  
  7. #include <PxPhysicsAPI.h>
  8.  
  9.  
  10. using namespace std;
  11. using namespace physx;
  12.  
  13. static PxPhysics* gPhysicsSDK = NULL;
  14. PxDefaultErrorCallback gDefaultErrorCallback;
  15. static PxDefaultAllocator gDefaultAllocatorCallback;
  16.  
  17. void fatalError(string error) {
  18.     std::cout << error << std::endl;
  19.     exit(1);
  20. }
  21.  
  22. void InitializePhysX() {
  23.  
  24.     PxFoundation* mFoundation = PxCreateFoundation(PX_PHYSICS_VERSION, gDefaultAllocatorCallback, gDefaultErrorCallback);
  25.     if(!mFoundation)
  26.         fatalError("PxCreateFoundation failed!");
  27. }
  28. void ShutdownPhysX() {
  29.     //gPhysicsSDK->release();
  30. }
  31.  
  32. void InitGL() {
  33. }
  34.  
  35. void OnShutdown() {
  36.     ShutdownPhysX();
  37. }
  38. int main(int argc, char** argv) {
  39.     atexit(OnShutdown);
  40.  
  41.     InitializePhysX();
  42.  
  43.     return 0;
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement