getIndexBuffer.lua 785 B

123456789101112131415161718192021222324252627282930
  1. return {
  2. summary = 'Get the Buffer backing the vertex indices of the Mesh.',
  3. description = [[
  4. Returns the `Buffer` object that holds the data for the vertex indices in the Mesh.
  5. This can be `nil` if the Mesh doesn't have any indices.
  6. If a Mesh uses the `cpu` storage mode, the index buffer is internal to the `Mesh` and this
  7. function will return `nil`. This ensures that the CPU data for the Mesh does not get out of
  8. sync with the GPU data in the Buffer.
  9. ]],
  10. arguments = {},
  11. returns = {
  12. buffer = {
  13. type = 'Buffer',
  14. description = 'The index buffer.'
  15. }
  16. },
  17. variants = {
  18. {
  19. arguments = {},
  20. returns = { 'buffer' }
  21. }
  22. },
  23. related = {
  24. 'Mesh:getIndices',
  25. 'Mesh:setIndices',
  26. 'Mesh:getVertexBuffer'
  27. }
  28. }