1% rtcSetGeometryBuffer(3) | Embree Ray Tracing Kernels 3 2 3#### NAME 4 5 rtcSetGeometryBuffer - assigns a view of a buffer to the geometry 6 7#### SYNOPSIS 8 9 #include <embree3/rtcore.h> 10 11 void rtcSetGeometryBuffer( 12 RTCGeometry geometry, 13 enum RTCBufferType type, 14 unsigned int slot, 15 enum RTCFormat format, 16 RTCBuffer buffer, 17 size_t byteOffset, 18 size_t byteStride, 19 size_t itemCount 20 ); 21 22#### DESCRIPTION 23 24The `rtcSetGeometryBuffer` function binds a view of a buffer object 25(`buffer` argument) to a geometry buffer type and slot (`type` and 26`slot` argument) of the specified geometry (`geometry` argument). 27 28One can specify the start of the first buffer element in bytes 29(`byteOffset` argument), the byte stride between individual buffer 30elements (`byteStride` argument), the format of the buffer elements 31(`format` argument), and the number of elements to bind (`itemCount`). 32 33The start address (`byteOffset` argument) and stride (`byteStride` 34argument) must be both aligned to 4 bytes, otherwise the 35`rtcSetGeometryBuffer` function will fail. 36 37After successful completion of this function, the geometry 38will hold a reference to the buffer object. 39 40#### EXIT STATUS 41 42On failure an error code is set that can be queried using 43`rtcGetDeviceError`. 44 45#### SEE ALSO 46 47[rtcSetSharedGeometryBuffer], [rtcSetNewGeometryBuffer] 48 49