.\" Automatically generated by Pandoc 2.9.2.1
.\"
.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 <embree4/rtcore.h>

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[C]rtcSetNewGeometryBuffer\f[R] function creates a new data buffer
of specified format (\f[C]format\f[R] argument), byte stride
(\f[C]byteStride\f[R] argument), and number of items
(\f[C]itemCount\f[R] argument), and assigns it to a geometry buffer slot
(\f[C]type\f[R] and \f[C]slot\f[R] argument) of the specified geometry
(\f[C]geometry\f[R] argument).
The buffer data is managed internally and automatically freed when the
geometry is destroyed.
.PP
The byte stride (\f[C]byteStride\f[R] argument) must be aligned to 4
bytes; otherwise the \f[C]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[C]rtcGetDeviceError\f[R].
.SS SEE ALSO
.PP
[rtcSetGeometryBuffer], [rtcSetSharedGeometryBuffer]
