| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- .TH "rtcSetDeviceErrorFunction" "3" "" "" "Embree Ray Tracing Kernels 3"
- .SS NAME
- .IP
- .nf
- \f[C]
- rtcSetDeviceErrorFunction\ \-\ sets\ an\ error\ callback\ function\ for\ the\ device
- \f[]
- .fi
- .SS SYNOPSIS
- .IP
- .nf
- \f[C]
- #include\ <embree3/rtcore.h>
- typedef\ void\ (*RTCErrorFunction)(
- \ \ void*\ userPtr,
- \ \ RTCError\ code,
- \ \ const\ char*\ str
- );
- void\ rtcSetDeviceErrorFunction(
- \ \ RTCDevice\ device,
- \ \ RTCErrorFunction\ error,
- \ \ void*\ userPtr
- );
- \f[]
- .fi
- .SS DESCRIPTION
- .PP
- Using the \f[C]rtcSetDeviceErrorFunction\f[] call, it is possible to set
- a callback function (\f[C]error\f[] argument) with payload
- (\f[C]userPtr\f[] argument), which is called whenever an error occurs
- for the specified device (\f[C]device\f[] argument).
- .PP
- Only a single callback function can be registered per device, and
- further invocations overwrite the previously set callback function.
- Passing \f[C]NULL\f[] as function pointer disables the registered
- callback function.
- .PP
- When the registered callback function is invoked, it gets passed the
- user\-defined payload (\f[C]userPtr\f[] argument as specified at
- registration time), the error code (\f[C]code\f[] argument) of the
- occurred error, as well as a string (\f[C]str\f[] argument) that further
- describes the error.
- .PP
- The error code is also set if an error callback function is registered.
- .SS EXIT STATUS
- .PP
- On failure an error code is set that can be queried using
- \f[C]rtcGetDeviceError\f[].
- .SS SEE ALSO
- .PP
- [rtcGetDeviceError]
|