bjorn 2 years ago
parent
commit
101039f390
1 changed files with 46 additions and 41 deletions
  1. 46 41
      api/init.lua

+ 46 - 41
api/init.lua

@@ -14120,6 +14120,52 @@ return {
           description = "Pass objects are used to record commands for the GPU.  Commands can be recorded by calling functions on the Pass.  After recording a set of passes, they can be submitted for the GPU to process using `lovr.graphics.submit`.\n\nPass objects are **temporary** and only exist for a single frame.  Once `lovr.graphics.submit` is called to end the frame, any passes that were created during that frame become **invalid**. Each frame, a new set of passes must be created and recorded.  LÖVR tries to detect if you use a pass after it's invalid, but this error checking is not 100% accurate at the moment.\n\nThere are 3 types of passes.  Each type can record a specific type of command:\n\n- `render` passes render graphics to textures.\n- `compute` passes run compute shaders.\n- `transfer` passes can transfer data to/from GPU objects, like `Buffer` and `Texture`.",
           key = "Pass",
           module = "lovr.graphics",
+          sections = {
+            {
+              name = "Drawing",
+              tag = "drawing",
+              description = "Draw objects and shapes."
+            },
+            {
+              name = "Coordinate System",
+              tag = "transform",
+              description = "Manipulate the 3D coordinate system."
+            },
+            {
+              name = "Render States",
+              tag = "pipeline",
+              description = "Set render states that change the way drawing happens."
+            },
+            {
+              name = "Shader Variables",
+              tag = "shader-inputs"
+            },
+            {
+              name = "Camera",
+              tag = "camera"
+            },
+            {
+              name = "Compute",
+              tag = "compute"
+            },
+            {
+              name = "Transfers",
+              tag = "transfer"
+            },
+            {
+              name = "Tallies",
+              tag = "tallies"
+            },
+            {
+              name = "Miscellaneous",
+              tag = "pass-misc"
+            }
+          },
+          constructors = {
+            "lovr.graphics.getPass",
+            "lovr.graphics.getWindowPass",
+            "lovr.headset.getPass"
+          },
           methods = {
             {
               name = "blit",
@@ -17307,47 +17353,6 @@ return {
                 "Pass:pop"
               }
             }
-          },
-          sections = {
-            {
-              name = "Drawing",
-              tag = "drawing",
-              description = "Draw objects and shapes."
-            },
-            {
-              name = "Coordinate System",
-              tag = "transform",
-              description = "Manipulate the 3D coordinate system."
-            },
-            {
-              name = "Render States",
-              tag = "pipeline",
-              description = "Set render states that change the way drawing happens."
-            },
-            {
-              name = "Shader Variables",
-              tag = "shader-inputs"
-            },
-            {
-              name = "Camera",
-              tag = "camera"
-            },
-            {
-              name = "Compute",
-              tag = "compute"
-            },
-            {
-              name = "Transfers",
-              tag = "transfer"
-            },
-            {
-              name = "Tallies",
-              tag = "tallies"
-            },
-            {
-              name = "Miscellaneous",
-              tag = "pass-misc"
-            }
           }
         },
         {