init.lua 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. return {
  2. tag = 'modules',
  3. summary = 'Renders graphics.',
  4. description = [[
  5. The `lovr.graphics` module renders graphics to displays. Anything rendered using this module
  6. will automatically show up in the VR headset if one is connected, otherwise it will just show up
  7. in a window on the desktop.
  8. ]],
  9. sections = {
  10. {
  11. name = 'Drawing',
  12. tag = 'graphicsPrimitives',
  13. description = 'Simple functions for drawing simple shapes.'
  14. },
  15. {
  16. name = 'Objects',
  17. tag = 'graphicsObjects',
  18. description = [[
  19. Several graphics-related objects can be created with the graphics module. Try to avoid
  20. calling these functions in `lovr.update` or `lovr.draw`, because then the objects will be
  21. loaded every frame, which can really slow things down!
  22. ]]
  23. },
  24. {
  25. name = 'Transforms',
  26. tag = 'graphicsTransforms',
  27. description = [[
  28. These functions manipulate the 3D coordinate system. By default the negative z axis points
  29. forwards and the positive y axis points up. Manipulating the coordinate system can be used
  30. to create a hierarchy of rendered objects. Thinking in many different coordinate systems
  31. can be challenging though, so be sure to brush up on 3D math first!
  32. ]]
  33. },
  34. {
  35. name = 'State',
  36. tag = 'graphicsState',
  37. description = [[
  38. These functions get or set graphics state. Graphics state is is a collection of small
  39. settings like the background color of the scene or the active shader. Keep in mind that all
  40. this state is **global**, so if you change a setting, the change will persist until that
  41. piece of state is changed again.
  42. ]]
  43. },
  44. {
  45. name = 'Window',
  46. tag = 'window',
  47. description = [[
  48. Get info about the desktop window or operate on the underlying graphics context.
  49. ]]
  50. }
  51. }
  52. }