Browse Source

Document Pass:setCullMode more similarly to other pages;

It's more similar to :setBlendMode and :setDepthTest, where nil can be
used to "disable" the thing.
bjorn 1 year ago
parent
commit
7be2435ccd
2 changed files with 13 additions and 5 deletions
  1. 7 3
      api/init.lua
  2. 6 2
      api/lovr/graphics/Pass/setCullMode.lua

+ 7 - 3
api/init.lua

@@ -20703,7 +20703,7 @@ return {
               description = "Sets whether the front or back faces of triangles are culled.",
               key = "Pass:setCullMode",
               module = "lovr.graphics",
-              notes = "The default cull mode is `none`.",
+              notes = "By default, face culling is disabled.",
               related = {
                 "Pass:setViewCull",
                 "Pass:setWinding"
@@ -20714,11 +20714,15 @@ return {
                     {
                       name = "mode",
                       type = "CullMode",
-                      description = "Whether `front` faces, `back` faces, or `none` of the faces should be culled.",
-                      default = "'none'"
+                      description = "Whether `front` faces, `back` faces, or `none` of the faces should be culled."
                     }
                   },
                   returns = {}
+                },
+                {
+                  description = "Disable face culling.",
+                  arguments = {},
+                  returns = {}
                 }
               }
             },

+ 6 - 2
api/lovr/graphics/Pass/setCullMode.lua

@@ -5,7 +5,6 @@ return {
   arguments = {
     mode = {
       type = 'CullMode',
-      default = [['none']],
       description = 'Whether `front` faces, `back` faces, or `none` of the faces should be culled.'
     }
   },
@@ -14,9 +13,14 @@ return {
     {
       arguments = { 'mode' },
       returns = {}
+    },
+    {
+      description = 'Disable face culling.',
+      arguments = {},
+      returns = {}
     }
   },
-  notes = 'The default cull mode is `none`.',
+  notes = 'By default, face culling is disabled.',
   related = {
     'Pass:setViewCull',
     'Pass:setWinding'