rtcSetGeometryBuffer.3embree3 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. .TH "rtcSetGeometryBuffer" "3" "" "" "Embree Ray Tracing Kernels 3"
  2. .SS NAME
  3. .IP
  4. .nf
  5. \f[C]
  6. rtcSetGeometryBuffer\ \-\ assigns\ a\ view\ of\ a\ buffer\ to\ the\ geometry
  7. \f[]
  8. .fi
  9. .SS SYNOPSIS
  10. .IP
  11. .nf
  12. \f[C]
  13. #include\ <embree3/rtcore.h>
  14. void\ rtcSetGeometryBuffer(
  15. \ \ RTCGeometry\ geometry,
  16. \ \ enum\ RTCBufferType\ type,
  17. \ \ unsigned\ int\ slot,
  18. \ \ enum\ RTCFormat\ format,
  19. \ \ RTCBuffer\ buffer,
  20. \ \ size_t\ byteOffset,
  21. \ \ size_t\ byteStride,
  22. \ \ size_t\ itemCount
  23. );
  24. \f[]
  25. .fi
  26. .SS DESCRIPTION
  27. .PP
  28. The \f[C]rtcSetGeometryBuffer\f[] function binds a view of a buffer
  29. object (\f[C]buffer\f[] argument) to a geometry buffer type and slot
  30. (\f[C]type\f[] and \f[C]slot\f[] argument) of the specified geometry
  31. (\f[C]geometry\f[] argument).
  32. .PP
  33. One can specify the start of the first buffer element in bytes
  34. (\f[C]byteOffset\f[] argument), the byte stride between individual
  35. buffer elements (\f[C]byteStride\f[] argument), the format of the buffer
  36. elements (\f[C]format\f[] argument), and the number of elements to bind
  37. (\f[C]itemCount\f[]).
  38. .PP
  39. The start address (\f[C]byteOffset\f[] argument) and stride
  40. (\f[C]byteStride\f[] argument) must be both aligned to 4 bytes,
  41. otherwise the \f[C]rtcSetGeometryBuffer\f[] function will fail.
  42. .PP
  43. After successful completion of this function, the geometry will hold a
  44. reference to the buffer object.
  45. .SS EXIT STATUS
  46. .PP
  47. On failure an error code is set that can be queried using
  48. \f[C]rtcGetDeviceError\f[].
  49. .SS SEE ALSO
  50. .PP
  51. [rtcSetSharedGeometryBuffer], [rtcSetNewGeometryBuffer]