Browse Source

Update lovr.graphics.fill;

bjorn 7 years ago
parent
commit
b1d8fd5875
2 changed files with 45 additions and 3 deletions
  1. 18 0
      api/init.lua
  2. 27 3
      api/lovr/graphics/fill.lua

+ 18 - 0
api/init.lua

@@ -7175,8 +7175,10 @@ return {
           description = "Draws a fullscreen textured quad.",
           description = "Draws a fullscreen textured quad.",
           key = "lovr.graphics.fill",
           key = "lovr.graphics.fill",
           module = "lovr.graphics",
           module = "lovr.graphics",
+          notes = "This function ignores stereo rendering, so it will stretch the input across the entire Canvas if it's stereo.",
           variants = {
           variants = {
             {
             {
+              description = "Fills the screen with a Texture.",
               arguments = {
               arguments = {
                 {
                 {
                   name = "texture",
                   name = "texture",
@@ -7185,6 +7187,22 @@ return {
                 }
                 }
               },
               },
               returns = {}
               returns = {}
+            },
+            {
+              description = "Fills the screen with the first Texture attached to a Canvas.",
+              arguments = {
+                {
+                  name = "canvas",
+                  type = "Canvas",
+                  description = "The first Texture attached to this Canvas will be used."
+                }
+              },
+              returns = {}
+            },
+            {
+              description = "Fills the screen with the active color.",
+              arguments = {},
+              returns = {}
             }
             }
           }
           }
         },
         },

+ 27 - 3
api/lovr/graphics/fill.lua

@@ -3,11 +3,35 @@ return {
   summary = 'Fill the screen with a texture.',
   summary = 'Fill the screen with a texture.',
   description = 'Draws a fullscreen textured quad.',
   description = 'Draws a fullscreen textured quad.',
   arguments = {
   arguments = {
-    {
-      name = 'texture',
+    texture = {
       type = 'Texture',
       type = 'Texture',
       description = 'The texture to use.'
       description = 'The texture to use.'
+    },
+    canvas = {
+      type = 'Canvas',
+      description = 'The first Texture attached to this Canvas will be used.'
+    }
+  },
+  returns = {},
+  variants = {
+    {
+      description = 'Fills the screen with a Texture.',
+      arguments = { 'texture' },
+      returns = {}
+    },
+    {
+      description = 'Fills the screen with the first Texture attached to a Canvas.',
+      arguments = { 'canvas' },
+      returns = {}
+    },
+    {
+      description = 'Fills the screen with the active color.',
+      arguments = {},
+      returns = {}
     }
     }
   },
   },
-  returns = {}
+  notes = [[
+    This function ignores stereo rendering, so it will stretch the input across the entire Canvas if
+    it's stereo.
+  ]]
 }
 }