setWinding.lua 777 B

1234567891011121314151617181920212223242526
  1. return {
  2. tag = 'graphicsState',
  3. summary = 'Set the winding direction.',
  4. description = [[
  5. Sets the polygon winding. The winding direction determines which face of a triangle is the
  6. front face and which is the back face. This lets the graphics engine cull the back faces of
  7. polygons, improving performance. The default is counterclockwise.
  8. ]],
  9. arguments = {
  10. {
  11. name = 'winding',
  12. type = 'Winding',
  13. description = 'The new winding direction.'
  14. }
  15. },
  16. returns = {},
  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. }