Browse Source

Update mirror signature;

bjorn 2 years ago
parent
commit
ec774d0fc1
2 changed files with 28 additions and 4 deletions
  1. 14 2
      api/init.lua
  2. 14 2
      api/lovr/callbacks/mirror.lua

+ 14 - 2
api/init.lua

@@ -481,8 +481,20 @@ return {
       module = "lovr",
       module = "lovr",
       variants = {
       variants = {
         {
         {
-          arguments = {},
-          returns = {}
+          arguments = {
+            {
+              name = "pass",
+              type = "Pass",
+              description = "A render pass targeting the window."
+            }
+          },
+          returns = {
+            {
+              name = "skip",
+              type = "boolean",
+              description = "If truthy, the input Pass will not be submitted to the GPU."
+            }
+          }
         }
         }
       },
       },
       examples = {
       examples = {

+ 14 - 2
api/lovr/callbacks/mirror.lua

@@ -7,8 +7,20 @@ return {
     mirroring behavior.  For example, a stereo view could be drawn instead of a single eye or a 2D
     mirroring behavior.  For example, a stereo view could be drawn instead of a single eye or a 2D
     HUD could be rendered.
     HUD could be rendered.
   ]],
   ]],
-  arguments = {},
-  returns = {},
+  arguments = {
+    {
+      name = 'pass',
+      type = 'Pass',
+      description = 'A render pass targeting the window.'
+    }
+  },
+  returns = {
+    {
+      name = 'skip',
+      type = 'boolean',
+      description = 'If truthy, the input Pass will not be submitted to the GPU.'
+    }
+  },
   example = {
   example = {
     description = [[
     description = [[
       The default `lovr.mirror` implementation draws the headset mirror texture to the window if
       The default `lovr.mirror` implementation draws the headset mirror texture to the window if