MCPcopy Create free account
hub / github.com/ValveSoftware/steam-audio / createEmbreeDevice

Method createEmbreeDevice

core/src/core/api_embree_device.cpp:72–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

70// --------------------------------------------------------------------------------------------------------------------
71
72IPLerror CContext::createEmbreeDevice(IPLEmbreeDeviceSettings* settings,
73 IEmbreeDevice** device)
74{
75#if defined(IPL_USES_EMBREE) && (defined(IPL_CPU_X86) || defined(IPL_CPU_X64))
76 if (!device)
77 return IPL_STATUS_FAILURE;
78
79 try
80 {
81 auto _device = reinterpret_cast<CEmbreeDevice*>(gMemory().allocate(sizeof(CEmbreeDevice), Memory::kDefaultAlignment));
82 new (_device) CEmbreeDevice(this, settings);
83 *device = _device;
84 }
85 catch (Exception exception)
86 {
87 return static_cast<IPLerror>(exception.status());
88 }
89
90 return IPL_STATUS_SUCCESS;
91#else
92 return IPL_STATUS_FAILURE;
93#endif
94}
95
96}

Callers 5

iplEmbreeDeviceCreateFunction · 0.45
iplEmbreeDeviceCreateFunction · 0.45
iplEmbreeDeviceCreateFunction · 0.45
iplEmbreeDeviceCreateFunction · 0.45
iplEmbreeDeviceCreateFunction · 0.45

Calls 2

statusMethod · 0.80
allocateMethod · 0.45

Tested by

no test coverage detected