rtcSetNewGeometryBuffer.3embree3 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. .TH "rtcSetNewGeometryBuffer" "3" "" "" "Embree Ray Tracing Kernels 3"
  2. .SS NAME
  3. .IP
  4. .nf
  5. \f[C]
  6. rtcSetNewGeometryBuffer\ \-\ creates\ and\ assigns\ a\ new\ data\ buffer\ to
  7. \ \ the\ geometry
  8. \f[]
  9. .fi
  10. .SS SYNOPSIS
  11. .IP
  12. .nf
  13. \f[C]
  14. #include\ <embree3/rtcore.h>
  15. void*\ rtcSetNewGeometryBuffer(
  16. \ \ RTCGeometry\ geometry,
  17. \ \ enum\ RTCBufferType\ type,
  18. \ \ unsigned\ int\ slot,
  19. \ \ enum\ RTCFormat\ format,
  20. \ \ size_t\ byteStride,
  21. \ \ size_t\ itemCount
  22. );
  23. \f[]
  24. .fi
  25. .SS DESCRIPTION
  26. .PP
  27. The \f[C]rtcSetNewGeometryBuffer\f[] function creates a new data buffer
  28. of specified format (\f[C]format\f[] argument), byte stride
  29. (\f[C]byteStride\f[] argument), and number of items (\f[C]itemCount\f[]
  30. argument), and assigns it to a geometry buffer slot (\f[C]type\f[] and
  31. \f[C]slot\f[] argument) of the specified geometry (\f[C]geometry\f[]
  32. argument).
  33. The buffer data is managed internally and automatically freed when the
  34. geometry is destroyed.
  35. .PP
  36. The byte stride (\f[C]byteStride\f[] argument) must be aligned to 4
  37. bytes; otherwise the \f[C]rtcSetNewGeometryBuffer\f[] function will
  38. fail.
  39. .PP
  40. The allocated buffer will be automatically over\-allocated slightly when
  41. used as a vertex buffer, where a requirement is that each buffer element
  42. should be readable using 16\-byte SSE load instructions.
  43. .SS EXIT STATUS
  44. .PP
  45. On failure an error code is set that can be queried using
  46. \f[C]rtcGetDeviceError\f[].
  47. .SS SEE ALSO
  48. .PP
  49. [rtcSetGeometryBuffer], [rtcSetSharedGeometryBuffer]