-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
50 lines (38 loc) · 1.29 KB
/
Copy pathmain.cpp
File metadata and controls
50 lines (38 loc) · 1.29 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
/*****************************************************************************/
/*
CS391 Project 3 Profiler Scenario
This is adapted from Cody Pritchard's PHY350/399 Fluid Simulation Work
This sample provides a nice, juicy, CPU intensive application to test
your profiler on for project 3.
*/
/*****************************************************************************/
#include <windows.h>
#include "Fluid.h"
#include "Profiler.h"
Fluid* FLUID = NULL;
void InitializeDirectX();
int RunDirectX();
// Frame Update Function - Called Every Frame
void CALLBACK OnFrameMove( double /*fTime*/, float /*fElapsedTime*/, void* /*pUserContext*/ )
{
FLUID->Update( FluidTimestep );
}
// main
INT WINAPI wWinMain( HINSTANCE, HINSTANCE, LPWSTR, int )
{
Profiler profiler(10000, "profiled_report.txt");
FLUID = new Fluid();
FLUID->Create( 1.6f, 1.2f );
#ifdef _DEBUG
// This runs really slow in Debug. Understand? Comment out this line, then change the next line to 0.2f
//#error Do NOT submit a profiler report for the DEBUG version. Understand? You may comment out this line.
FLUID->Fill( 0.2f );
#else
// Do NOT change the simulation size for the profiler report you submit.
FLUID->Fill( 0.5f );
#endif
InitializeDirectX();
int retval = RunDirectX();
delete FLUID; FLUID = NULL;
return retval;
}