Browse Source

Minor fixes;

bjorn 2 years ago
parent
commit
49dc0023f0

+ 4 - 4
api/init.lua

@@ -8448,7 +8448,7 @@ return {
             {
             {
               name = "setLineSpacing",
               name = "setLineSpacing",
               summary = "Set the line spacing of the Font.",
               summary = "Set the line spacing of the Font.",
-              description = "Sets the line spacing of the Font.  When spacing out lines, the height of the font is multiplied the line spacing to get the final spacing value.  The default is 1.0.",
+              description = "Sets the line spacing of the Font.  When spacing out lines, the height of the font is multiplied by the line spacing to get the final spacing value.  The default is 1.0.",
               key = "Font:setLineSpacing",
               key = "Font:setLineSpacing",
               module = "lovr.graphics",
               module = "lovr.graphics",
               related = {
               related = {
@@ -13499,7 +13499,7 @@ return {
                     },
                     },
                     {
                     {
                       name = "transform",
                       name = "transform",
-                      type = "transform",
+                      type = "Mat4",
                       description = "The transform of the text."
                       description = "The transform of the text."
                     },
                     },
                     {
                     {
@@ -13533,7 +13533,7 @@ return {
                     },
                     },
                     {
                     {
                       name = "transform",
                       name = "transform",
-                      type = "transform",
+                      type = "Mat4",
                       description = "The transform of the text."
                       description = "The transform of the text."
                     },
                     },
                     {
                     {
@@ -30828,7 +30828,7 @@ return {
       description = "This callback is called every frame, and receives a `Pass` object as an argument which can be used to render graphics to the display.  If a VR headset is connected, this function renders to the headset display, otherwise it will render to the desktop window.",
       description = "This callback is called every frame, and receives a `Pass` object as an argument which can be used to render graphics to the display.  If a VR headset is connected, this function renders to the headset display, otherwise it will render to the desktop window.",
       key = "lovr.draw",
       key = "lovr.draw",
       module = "lovr",
       module = "lovr",
-      notes = "To render to the desktop window when a VR headset is connected, use the `lovr.mirror` callback.\n\nThe display is cleared to the global background color before this callback is called, which can be changed using `lovr.graphics.setBackgroundColor`.\n\nSince the `lovr.graphics.submit` function always returns true, the following idiom can be used to submit graphics work manually and override the default submission:\n\n    function lovr.draw(pass)\n      local passes = getPasses()\n      return lovr.graphics.submit(passes)\n    end",
+      notes = "To render to the desktop window when a VR headset is connected, use the `lovr.mirror` callback.\n\nThe display is cleared to the global background color before this callback is called, which can be changed using `lovr.graphics.setBackgroundColor`.\n\nSince the `lovr.graphics.submit` function always returns true, the following idiom can be used to submit graphics work manually and override the default submission:\n\n    function lovr.draw(pass)\n      local passes = {}\n\n      -- ... record multiple passes and add to passes table\n\n      return lovr.graphics.submit(passes)\n    end",
       related = {
       related = {
         "lovr.mirror",
         "lovr.mirror",
         "lovr.headset.getPass",
         "lovr.headset.getPass",

+ 4 - 1
api/lovr/callbacks/draw.lua

@@ -30,7 +30,10 @@ return {
     to submit graphics work manually and override the default submission:
     to submit graphics work manually and override the default submission:
 
 
         function lovr.draw(pass)
         function lovr.draw(pass)
-          local passes = getPasses()
+          local passes = {}
+
+          -- ... record multiple passes and add to passes table
+
           return lovr.graphics.submit(passes)
           return lovr.graphics.submit(passes)
         end
         end
   ]],
   ]],

+ 1 - 1
api/lovr/graphics/Font/setLineSpacing.lua

@@ -2,7 +2,7 @@ return {
   summary = 'Set the line spacing of the Font.',
   summary = 'Set the line spacing of the Font.',
   description = [[
   description = [[
     Sets the line spacing of the Font.  When spacing out lines, the height of the font is multiplied
     Sets the line spacing of the Font.  When spacing out lines, the height of the font is multiplied
-    the line spacing to get the final spacing value.  The default is 1.0.
+    by the line spacing to get the final spacing value.  The default is 1.0.
   ]],
   ]],
   arguments = {
   arguments = {
     spacing = {
     spacing = {

+ 1 - 1
api/lovr/graphics/Pass/text.lua

@@ -17,7 +17,7 @@ return {
       ]]
       ]]
     },
     },
     transform = {
     transform = {
-      type = 'transform',
+      type = 'Mat4',
       description = 'The transform of the text.'
       description = 'The transform of the text.'
     },
     },
     wrap = {
     wrap = {