| 53 | static SampleCommandLine* gSampleCommandLine = NULL; |
| 54 | |
| 55 | void mainInitialize() |
| 56 | { |
| 57 | PX_ASSERT(gSampleCommandLine); |
| 58 | const SampleCommandLine& cmdline = *gSampleCommandLine; |
| 59 | initSampleAllocator(); |
| 60 | gApp = SAMPLE_NEW(PhysXSampleApplication)(cmdline); |
| 61 | |
| 62 | gApp->customizeSample(gSettings); |
| 63 | |
| 64 | if (gApp->isOpen()) |
| 65 | gApp->close(); |
| 66 | |
| 67 | gApp->open(gSettings.mWidth, gSettings.mHeight, gSettings.mName, gSettings.mFullscreen); |
| 68 | #if SEPARATE_EVENT_LOOP |
| 69 | gApp->start(Ps::Thread::getDefaultStackSize()); |
| 70 | #else |
| 71 | if(gApp->isOpen()) gApp->onOpen(); |
| 72 | #endif |
| 73 | } |
| 74 | |
| 75 | void mainTerminate() |
| 76 | { |
no test coverage detected