Permalink
Cannot retrieve contributors at this time
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
40 lines (31 sloc)
845 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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; | |
} |