read.lua 679 B

123456789101112131415161718192021222324252627282930
  1. return {
  2. summary = 'Read a variable from the ShaderBlock.',
  3. description = 'Returns a variable in the ShaderBlock.',
  4. arguments = {
  5. {
  6. name = 'name',
  7. type = 'string',
  8. description = 'The name of the variable to read.'
  9. }
  10. },
  11. returns = {
  12. {
  13. name = 'value',
  14. type = '*',
  15. description = 'The value of the variable.'
  16. }
  17. },
  18. notes = [[
  19. This function is really slow! Only read back values when you need to.
  20. Vectors and matrices will be returned as (flat) tables.
  21. ]],
  22. related = {
  23. 'Shader:send',
  24. 'Shader:sendBlock',
  25. 'ShaderBlock:getShaderCode',
  26. 'ShaderBlock:getOffset',
  27. 'ShaderBlock:getSize'
  28. }
  29. }