.\" Automatically generated by Pandoc 2.9.2.1 .\" .TH "rtcNewBuffer" "3" "" "" "Embree Ray Tracing Kernels 4" .hy .SS NAME .IP .nf \f[C] rtcNewBuffer - creates a new data buffer \f[R] .fi .SS SYNOPSIS .IP .nf \f[C] #include RTCBuffer rtcNewBuffer( RTCDevice device, size_t byteSize ); \f[R] .fi .SS DESCRIPTION .PP The \f[C]rtcNewBuffer\f[R] function creates a new data buffer object of specified size in bytes (\f[C]byteSize\f[R] argument) that is bound to the specified device (\f[C]device\f[R] argument). The buffer object is reference counted with an initial reference count of 1. The returned buffer object can be released using the \f[C]rtcReleaseBuffer\f[R] API call. The specified number of bytes are allocated at buffer construction time and deallocated when the buffer is destroyed. .IP .nf \f[C] \f[R] .fi .SS EXIT STATUS .PP On failure \f[C]NULL\f[R] is returned and an error code is set that can be queried using \f[C]rtcGetDeviceError\f[R]. .SS SEE ALSO .PP [rtcRetainBuffer], [rtcReleaseBuffer]