MCPcopy Create free account
hub / github.com/RenderKit/ospray / main

Function main

apps/ospExamples/ospExample.cpp:10–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8using rkcommon::make_unique;
9
10int main(int argc, const char *argv[])
11{
12 initializeOSPRay(argc, argv, false);
13
14 const bool denoiserAvailable = ospLoadModule("denoiser") == OSP_NO_ERROR;
15
16 bool denoiserGPUSupport = false;
17 if (denoiserAvailable) {
18 const void *sym =
19 rkcommon::getSymbol("ospray_module_denoiser_gpu_supported");
20 if (sym) {
21 auto denoiserGPUSupported = (int (*)())sym;
22 denoiserGPUSupport = denoiserGPUSupported();
23 }
24 }
25
26 auto glfwOSPRayWindow = make_unique<GLFWOSPRayWindow>(
27 vec2i(1024, 768), denoiserAvailable, denoiserGPUSupport);
28 glfwOSPRayWindow->mainLoop();
29 glfwOSPRayWindow.reset();
30
31 ospShutdown();
32
33 return 0;
34}

Callers

nothing calls this directly

Calls 4

initializeOSPRayFunction · 0.85
ospLoadModuleFunction · 0.85
resetMethod · 0.80
mainLoopMethod · 0.45

Tested by

no test coverage detected