Browse Source

Pass:reset;

bjorn 1 year ago
parent
commit
a1cec789ff
2 changed files with 34 additions and 0 deletions
  1. 15 0
      api/init.lua
  2. 19 0
      api/lovr/graphics/Pass/reset.lua

+ 15 - 0
api/init.lua

@@ -19690,6 +19690,21 @@ return {
                 }
                 }
               }
               }
             },
             },
+            {
+              name = "reset",
+              tag = "pass-misc",
+              summary = "Reset the Pass.",
+              description = "Resets the Pass, clearing all of its draws and computes and resetting all of its state to the default values.\n\nThe only thing that doesn't get reset is the Pass's canvas.",
+              key = "Pass:reset",
+              module = "lovr.graphics",
+              notes = "Changing the canvas using `Pass:setCanvas` will also reset the Pass.",
+              variants = {
+                {
+                  arguments = {},
+                  returns = {}
+                }
+              }
+            },
             {
             {
               name = "rotate",
               name = "rotate",
               tag = "transform",
               tag = "transform",

+ 19 - 0
api/lovr/graphics/Pass/reset.lua

@@ -0,0 +1,19 @@
+return {
+  tag = 'pass-misc',
+  summary = 'Reset the Pass.',
+  description = [[
+    Resets the Pass, clearing all of its draws and computes and resetting all of its state to the
+    default values.
+
+    The only thing that doesn't get reset is the Pass's canvas.
+  ]],
+  arguments = {},
+  returns = {},
+  variants = {
+    {
+      arguments = {},
+      returns = {}
+    }
+  },
+  notes = 'Changing the canvas using `Pass:setCanvas` will also reset the Pass.'
+}