-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
44 lines (37 loc) · 988 Bytes
/
Copy pathmain.cpp
File metadata and controls
44 lines (37 loc) · 988 Bytes
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
#include "common/RayTracer.h"
#define ASSIGNMENT 0
#if ASSIGNMENT == 5
#define APPLICATION Assignment5
#include "assignment5/Assignment5.h"
#elif ASSIGNMENT == 6
#define APPLICATION Assignment6
#include "assignment6/Assignment6.h"
#elif ASSIGNMENT == 7
#define APPLICATION Assignment7
#include "assignment7/Assignment7.h"
#elif ASSIGNMENT == 8
#define APPLICATION Assignment8
#include "assignment8/Assignment8.h"
#elif ASSIGNMENT == 0
#define APPLICATION AssignmentF
#include "assignmentF/AssignmentF.h"
#endif
#ifdef _WIN32
#define WAIT_ON_EXIT 1
#else
#define WAIT_ON_EXIT 0
#endif
int main(int argc, char** argv)
{
std::unique_ptr<APPLICATION> currentApplication = make_unique<APPLICATION>();
RayTracer rayTracer(std::move(currentApplication));
DIAGNOSTICS_TIMER(timer, "Ray Tracer");
rayTracer.Run();
DIAGNOSTICS_END_TIMER(timer);
DIAGNOSTICS_PRINT();
#if defined(_WIN32) && WAIT_ON_EXIT
int exit = 0;
std::cin >> exit;
#endif
return 0;
}