-
Notifications
You must be signed in to change notification settings - Fork 28
Expand file tree
/
Copy pathvklExamples.cpp
More file actions
40 lines (31 loc) · 845 Bytes
/
Copy pathvklExamples.cpp
File metadata and controls
40 lines (31 loc) · 845 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
// Copyright 2021 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#include "BatchApplication.h"
#include "InteractiveApplication.h"
#include "renderer/Scene.h"
using namespace openvkl::examples;
int main(int argc, char **argv)
{
Scene scene;
std::list<std::string> args(argv, argv + argc);
if (!scene.parseCommandLine(args)) {
return 0;
}
initializeOpenVKL();
try {
if (scene.interactive) {
InteractiveApplication app;
app.run(scene);
} else {
BatchApplication app;
app.run(scene);
}
} catch (const std::exception &e) {
// Handle fatal errors here. This mainly applies when invalid
// volume parameters are specified on the command line, so that no volume
// can be created at all.
std::cerr << e.what() << std::endl;
}
shutdownOpenVKL();
return 0;
}