getVertexBuffer.lua 715 B

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