getStats.lua 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. return {
  2. tag = 'graphicsState',
  3. summary = 'Get renderer stats for the current frame.',
  4. description = 'Returns graphics-related performance statistics for the current frame.',
  5. arguments = {},
  6. returns = {
  7. {
  8. name = 'stats',
  9. type = 'table',
  10. description = 'The table of stats.',
  11. table = {
  12. {
  13. name = 'drawcalls',
  14. type = 'number',
  15. description = 'The number of draw calls.'
  16. },
  17. {
  18. name = 'renderpasses',
  19. type = 'number',
  20. description = 'The number of times the canvas has been switched.'
  21. },
  22. {
  23. name = 'shaderswitches',
  24. type = 'number',
  25. description = 'The number of times the shader has been switched.'
  26. },
  27. {
  28. name = 'buffers',
  29. type = 'number',
  30. description = 'The number of buffers.'
  31. },
  32. {
  33. name = 'textures',
  34. type = 'number',
  35. description = 'The number of textures.'
  36. },
  37. {
  38. name = 'buffermemory',
  39. type = 'number',
  40. description = 'The amount of memory used by buffers, in bytes.'
  41. },
  42. {
  43. name = 'texturememory',
  44. type = 'number',
  45. description = 'The amount of memory used by textures, in bytes.'
  46. }
  47. }
  48. }
  49. }
  50. }