MCPcopy Create free account
hub / github.com/RenderKit/embree / initializeDevice

Function initializeDevice

tutorials/minimal/minimal.cpp:66–75  ·  view source on GitHub ↗

* Embree has a notion of devices, which are entities that can run * raytracing kernels. * We initialize our device here, and then register the error handler so that * we don't miss any errors. * * rtcNewDevice() takes a configuration string as an argument. See the API docs * for more information. * * Note that RTCDevice is reference-counted. */

Source from the content-addressed store, hash-verified

64 * Note that RTCDevice is reference-counted.
65 */
66RTCDevice initializeDevice()
67{
68 RTCDevice device = rtcNewDevice(NULL);
69
70 if (!device)
71 printf("error %d: cannot create device\n", rtcGetDeviceError(NULL));
72
73 rtcSetDeviceErrorFunction(device, errorFunction, NULL);
74 return device;
75}
76
77/*
78 * Create a scene, which is a collection of geometry objects. Scenes are

Callers 1

mainFunction · 0.70

Calls 3

rtcNewDeviceFunction · 0.85
rtcGetDeviceErrorFunction · 0.85

Tested by

no test coverage detected