.\" Automatically generated by Pandoc 2.5
.\"
.TH "rtcSetGeometryBuffer" "3" "" "" "Embree Ray Tracing Kernels 3"
.hy
.SS NAME
.IP
.nf
\f[C]
rtcSetGeometryBuffer \- assigns a view of a buffer to the geometry
\f[R]
.fi
.SS SYNOPSIS
.IP
.nf
\f[C]
#include <embree3/rtcore.h>

void rtcSetGeometryBuffer(
  RTCGeometry geometry,
  enum RTCBufferType type,
  unsigned int slot,
  enum RTCFormat format,
  RTCBuffer buffer,
  size_t byteOffset,
  size_t byteStride,
  size_t itemCount
);
\f[R]
.fi
.SS DESCRIPTION
.PP
The \f[C]rtcSetGeometryBuffer\f[R] function binds a view of a buffer
object (\f[C]buffer\f[R] argument) to a geometry buffer type and slot
(\f[C]type\f[R] and \f[C]slot\f[R] argument) of the specified geometry
(\f[C]geometry\f[R] argument).
.PP
One can specify the start of the first buffer element in bytes
(\f[C]byteOffset\f[R] argument), the byte stride between individual
buffer elements (\f[C]byteStride\f[R] argument), the format of the
buffer elements (\f[C]format\f[R] argument), and the number of elements
to bind (\f[C]itemCount\f[R]).
.PP
The start address (\f[C]byteOffset\f[R] argument) and stride
(\f[C]byteStride\f[R] argument) must be both aligned to 4 bytes,
otherwise the \f[C]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
.PP
On failure an error code is set that can be queried using
\f[C]rtcGetDeviceError\f[R].
.SS SEE ALSO
.PP
[rtcSetSharedGeometryBuffer], [rtcSetNewGeometryBuffer]
