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
|
// Copyright 2018 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
#include "GLFWOSPRayWindow.h"
#include "example_common.h"
using namespace ospray;
using rkcommon::make_unique;
int main(int argc, const char *argv[])
{
initializeOSPRay(argc, argv, false);
const bool denoiserAvailable = ospLoadModule("denoiser") == OSP_NO_ERROR;
bool denoiserGPUSupport = false;
if (denoiserAvailable) {
const void *sym =
rkcommon::getSymbol("ospray_module_denoiser_gpu_supported");
if (sym) {
auto denoiserGPUSupported = (int (*)())sym;
denoiserGPUSupport = denoiserGPUSupported();
}
}
auto glfwOSPRayWindow = make_unique<GLFWOSPRayWindow>(
vec2i(1024, 768), denoiserAvailable, denoiserGPUSupport);
glfwOSPRayWindow->mainLoop();
glfwOSPRayWindow.reset();
ospShutdown();
return 0;
}
|