diff options
| author | git perforce import user <a@b> | 2016-10-25 12:29:14 -0600 |
|---|---|---|
| committer | Sheikh Dawood Abdul Ajees <Sheikh Dawood Abdul Ajees> | 2016-10-25 18:56:37 -0500 |
| commit | 3dfe2108cfab31ba3ee5527e217d0d8e99a51162 (patch) | |
| tree | fa6485c169e50d7415a651bf838f5bcd0fd3bfbd /APEX_1.4/samples_v2/SampleParticlesImpactParticles/Main.cpp | |
| download | physx-3.4-3dfe2108cfab31ba3ee5527e217d0d8e99a51162.tar.xz physx-3.4-3dfe2108cfab31ba3ee5527e217d0d8e99a51162.zip | |
Initial commit:
PhysX 3.4.0 Update @ 21294896
APEX 1.4.0 Update @ 21275617
[CL 21300167]
Diffstat (limited to 'APEX_1.4/samples_v2/SampleParticlesImpactParticles/Main.cpp')
| -rw-r--r-- | APEX_1.4/samples_v2/SampleParticlesImpactParticles/Main.cpp | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/APEX_1.4/samples_v2/SampleParticlesImpactParticles/Main.cpp b/APEX_1.4/samples_v2/SampleParticlesImpactParticles/Main.cpp new file mode 100644 index 00000000..2dda1416 --- /dev/null +++ b/APEX_1.4/samples_v2/SampleParticlesImpactParticles/Main.cpp @@ -0,0 +1,51 @@ +#include "Utils.h" + +#include <DirectXMath.h> +#include "XInput.h" +#include "DXUTMisc.h" +#include "DXUTCamera.h" + + +#include "ApexController.h" +#include "ApexRenderer.h" +#include "CommonUIController.h" +#include "SampleUIController.h" +#include "SampleSceneController.h" + +#include "SampleManager.h" + +int WINAPI wWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nCmdShow) +{ + PX_UNUSED(hInstance); + PX_UNUSED(hPrevInstance); + PX_UNUSED(lpCmdLine); + PX_UNUSED(nCmdShow); + +// Enable run-time memory check for debug builds. +#if defined(DEBUG) | defined(_DEBUG) + _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF); + AllocConsole(); +#endif + + SampleManager* sampleManager = new SampleManager(L"APEX Particles Sample: Impact Particles"); + + CFirstPersonCamera camera; + + auto apexController = ApexController(PxDefaultSimulationFilterShader, &camera); + auto apexRender = ApexRenderer(&camera, apexController); + auto sceneController = SampleSceneController(&camera, apexController); + auto commonUiController = CommonUIController(&camera, &apexRender, &apexController); + auto sampleUIController = SampleUIController(&sceneController, &commonUiController); + + sampleManager->addControllerToFront(&apexController); + sampleManager->addControllerToFront(&apexRender); + sampleManager->addControllerToFront(&sceneController); + sampleManager->addControllerToFront(&sampleUIController); + sampleManager->addControllerToFront(&commonUiController); + + int result = sampleManager->run(); + + delete sampleManager; + + return result; +} |