getWinding.lua 758 B

1234567891011121314151617181920212223242526
  1. return {
  2. tag = 'graphicsState',
  3. summary = 'Get the winding direction.',
  4. description = [[
  5. Returns the current polygon winding. The winding direction determines which face of a triangle
  6. is the front face and which is the back face. This lets the graphics engine cull the back faces
  7. of polygons, improving performance.
  8. ]],
  9. arguments = {},
  10. returns = {
  11. {
  12. name = 'winding',
  13. type = 'Winding',
  14. description = 'The current winding direction.'
  15. }
  16. },
  17. notes = [[
  18. Culling is initially disabled and must be enabled using `lovr.graphics.setCullingEnabled`.
  19. The default winding direction is counterclockwise.
  20. ]],
  21. related = {
  22. 'lovr.graphics.setCullingEnabled',
  23. 'lovr.graphics.isCullingEnabled'
  24. }
  25. }