.\" Automatically generated by Pandoc 3.1.3 .\" .\" Define V font for inline verbatim, using C font in formats .\" that render this, and otherwise B font. .ie "\f[CB]x\f[]"x" \{\ . ftr V B . ftr VI BI . ftr VB B . ftr VBI BI .\} .el \{\ . ftr V CR . ftr VI CI . ftr VB CB . ftr VBI CBI .\} .TH "rtcSetNewGeometryBuffer" "3" "" "" "Embree Ray Tracing Kernels 4" .hy .SS NAME .IP .nf \f[C] rtcSetNewGeometryBuffer - creates and assigns a new data buffer to the geometry \f[R] .fi .SS SYNOPSIS .IP .nf \f[C] #include void* rtcSetNewGeometryBuffer( RTCGeometry geometry, enum RTCBufferType type, unsigned int slot, enum RTCFormat format, size_t byteStride, size_t itemCount ); \f[R] .fi .SS DESCRIPTION .PP The \f[V]rtcSetNewGeometryBuffer\f[R] function creates a new data buffer of specified format (\f[V]format\f[R] argument), byte stride (\f[V]byteStride\f[R] argument), and number of items (\f[V]itemCount\f[R] argument), and assigns it to a geometry buffer slot (\f[V]type\f[R] and \f[V]slot\f[R] argument) of the specified geometry (\f[V]geometry\f[R] argument). The buffer data is managed internally and automatically freed when the geometry is destroyed. .PP The byte stride (\f[V]byteStride\f[R] argument) must be aligned to 4 bytes; otherwise the \f[V]rtcSetNewGeometryBuffer\f[R] function will fail. .PP The allocated buffer will be automatically over-allocated slightly when used as a vertex buffer, where a requirement is that each buffer element should be readable using 16-byte SSE load instructions. .SS EXIT STATUS .PP On failure an error code is set that can be queried using \f[V]rtcGetDeviceError\f[R]. .SS SEE ALSO .PP [rtcSetGeometryBuffer], [rtcSetSharedGeometryBuffer]