.\" Automatically generated by Pandoc 3.1.11.1 .\" .TH "rtcSetGeometryBuffer" "3" "" "" "Embree Ray Tracing Kernels 4" .SS NAME .IP .EX rtcSetGeometryBuffer \- assigns a view of a buffer to the geometry .EE .SS SYNOPSIS .IP .EX #include void rtcSetGeometryBuffer( RTCGeometry geometry, enum RTCBufferType type, unsigned int slot, enum RTCFormat format, RTCBuffer buffer, size_t byteOffset, size_t byteStride, size_t itemCount ); .EE .SS DESCRIPTION The \f[CR]rtcSetGeometryBuffer\f[R] function binds a view of a buffer object (\f[CR]buffer\f[R] argument) to a geometry buffer type and slot (\f[CR]type\f[R] and \f[CR]slot\f[R] argument) of the specified geometry (\f[CR]geometry\f[R] argument). .PP One can specify the start of the first buffer element in bytes (\f[CR]byteOffset\f[R] argument), the byte stride between individual buffer elements (\f[CR]byteStride\f[R] argument), the format of the buffer elements (\f[CR]format\f[R] argument), and the number of elements to bind (\f[CR]itemCount\f[R]). .PP The start address (\f[CR]byteOffset\f[R] argument) and stride (\f[CR]byteStride\f[R] argument) must be both aligned to 4 bytes, otherwise the \f[CR]rtcSetGeometryBuffer\f[R] function will fail. .PP After successful completion of this function, the geometry will hold a reference to the buffer object. .SS EXIT STATUS On failure an error code is set that can be queried using \f[CR]rtcGetDeviceError\f[R]. .SS SEE ALSO [rtcSetSharedGeometryBuffer], [rtcSetNewGeometryBuffer]