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

Function ospDeviceSetParam

ospray/api/API.cpp:199–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

197OSPRAY_CATCH_END(nullptr)
198
199extern "C" void ospDeviceSetParam(OSPDevice _object,
200 const char *id,
201 OSPDataType type,
202 const void *mem) OSPRAY_CATCH_BEGIN
203{
204 THROW_IF_NULL_OBJECT(_object);
205 THROW_IF_NULL_STRING(id);
206 Device *object = (Device *)_object;
207
208 switch (type) {
209 case OSP_STRING:
210 object->setParam<std::string>(id, std::string((const char *)mem));
211 break;
212 case OSP_INT:
213 object->setParam<int>(id, *(int *)mem);
214 break;
215 case OSP_UINT:
216 object->setParam<uint32_t>(id, *(uint32_t *)mem);
217 break;
218 case OSP_BOOL:
219 object->setParam<bool>(id, *(bool *)mem);
220 break;
221 case OSP_VOID_PTR:
222 object->setParam<void *>(id, *(void **)&mem);
223 break;
224 default:
225 throw std::runtime_error("parameter type not handled for OSPDevice!");
226 };
227}
228OSPRAY_CATCH_END()
229
230extern "C" void ospDeviceRemoveParam(

Callers 3

runWorkerFunction · 0.85
initializeOSPRayFunction · 0.85
setParamMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected