Browse Source

lovr.draw has pass;

bjorn 3 years ago
parent
commit
91e082fbd9
2 changed files with 30 additions and 6 deletions
  1. 15 3
      api/init.lua
  2. 15 3
      api/lovr/callbacks/draw.lua

+ 15 - 3
api/init.lua

@@ -29298,13 +29298,25 @@ return {
       module = "lovr",
       related = {
         "lovr.mirror",
-        "lovr.headset.renderTo",
+        "lovr.headset.getPass",
         "lovr.graphics.setBackgroundColor"
       },
       variants = {
         {
-          arguments = {},
-          returns = {}
+          arguments = {
+            {
+              name = "pass",
+              type = "Pass",
+              description = "A render pass targeting the main display (headset or window)."
+            }
+          },
+          returns = {
+            {
+              name = "skip",
+              type = "boolean",
+              description = "Whether the input Pass should be submitted to the GPU."
+            }
+          }
         }
       }
     },

+ 15 - 3
api/lovr/callbacks/draw.lua

@@ -6,11 +6,23 @@ return {
     anything rendered by this function will appear in the headset display.  The display is cleared
     to the background color before this function is called.
   ]],
-  arguments = {},
-  returns = {},
+  arguments = {
+    {
+      name = 'pass',
+      type = 'Pass',
+      description = 'A render pass targeting the main display (headset or window).'
+    }
+  },
+  returns = {
+    {
+      name = 'skip',
+      type = 'boolean',
+      description = 'Whether the input Pass should be submitted to the GPU.'
+    }
+  },
   related = {
     'lovr.mirror',
-    'lovr.headset.renderTo',
+    'lovr.headset.getPass',
     'lovr.graphics.setBackgroundColor'
   }
 }