diff options
| author | sschirm <[email protected]> | 2016-12-27 13:43:54 +0100 |
|---|---|---|
| committer | sschirm <[email protected]> | 2016-12-27 13:43:54 +0100 |
| commit | 64566804758e08a4c1d13fc1f8f7cb9ea8c674c8 (patch) | |
| tree | ff28d36ab8f2023176d84ba397ad5aaf508dcff6 /APEX_1.4/samples_v2/SampleParticlesMeshParticles/Main.cpp | |
| parent | PhysX 3.4 / APEX 1.4 release candidate @21506124 (diff) | |
| download | physx-3.4-64566804758e08a4c1d13fc1f8f7cb9ea8c674c8.tar.xz physx-3.4-64566804758e08a4c1d13fc1f8f7cb9ea8c674c8.zip | |
PhysX 3.4, APEX 1.4 release candidate update: @21511067-21511214
Diffstat (limited to 'APEX_1.4/samples_v2/SampleParticlesMeshParticles/Main.cpp')
| -rw-r--r-- | APEX_1.4/samples_v2/SampleParticlesMeshParticles/Main.cpp | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/APEX_1.4/samples_v2/SampleParticlesMeshParticles/Main.cpp b/APEX_1.4/samples_v2/SampleParticlesMeshParticles/Main.cpp new file mode 100644 index 00000000..61565451 --- /dev/null +++ b/APEX_1.4/samples_v2/SampleParticlesMeshParticles/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: Mesh 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; +} |