Browse Source

Add getVertexMap variants;

bjorn 7 years ago
parent
commit
c1bd0914a2
2 changed files with 67 additions and 7 deletions
  1. 42 4
      api/init.lua
  2. 25 3
      api/lovr/graphics/Mesh/getVertexMap.lua

+ 42 - 4
api/init.lua

@@ -10569,13 +10569,27 @@ return {
               variants = {
               variants = {
                 {
                 {
                   arguments = {},
                   arguments = {},
-                  returns = {
+                  returns = {}
+                },
+                {
+                  arguments = {
                     {
                     {
-                      name = "map",
+                      name = "t",
                       type = "table",
                       type = "table",
-                      description = "The list of indices in the vertex map, or nil if no vertex map is set."
+                      description = "The table to fill with the vertex map."
                     }
                     }
-                  }
+                  },
+                  returns = {}
+                },
+                {
+                  arguments = {
+                    {
+                      name = "blob",
+                      type = "Blob",
+                      description = "The Blob to fill with the vertex map data."
+                    }
+                  },
+                  returns = {}
                 }
                 }
               }
               }
             },
             },
@@ -11274,6 +11288,25 @@ return {
           key = "Texture",
           key = "Texture",
           module = "lovr.graphics",
           module = "lovr.graphics",
           methods = {
           methods = {
+            {
+              name = "getDepth",
+              summary = "Get the depth of the Texture.",
+              description = "Returns the depth of the Texture, or the number of images stored in the Texture.",
+              key = "Texture:getDepth",
+              module = "lovr.graphics",
+              variants = {
+                {
+                  arguments = {},
+                  returns = {
+                    {
+                      name = "depth",
+                      type = "number",
+                      description = "The depth of the Texture."
+                    }
+                  }
+                }
+              }
+            },
             {
             {
               name = "getDimensions",
               name = "getDimensions",
               summary = "Get the dimensions of the Texture.",
               summary = "Get the dimensions of the Texture.",
@@ -11293,6 +11326,11 @@ return {
                       name = "height",
                       name = "height",
                       type = "number",
                       type = "number",
                       description = "The height of the Texture, in pixels."
                       description = "The height of the Texture, in pixels."
+                    },
+                    {
+                      name = "depth",
+                      type = "number",
+                      description = "The number of images stored in the Texture."
                     }
                     }
                   }
                   }
                 }
                 }

+ 25 - 3
api/lovr/graphics/Mesh/getVertexMap.lua

@@ -4,12 +4,34 @@ return {
     Returns the current vertex map for the Mesh.  The vertex map is a list of indices in the Mesh,
     Returns the current vertex map for the Mesh.  The vertex map is a list of indices in the Mesh,
     allowing the reordering or reuse of vertices.
     allowing the reordering or reuse of vertices.
   ]],
   ]],
-  arguments = {},
+  arguments = {
+    t = {
+      type = 'table',
+      description = 'The table to fill with the vertex map.'
+    },
+    blob = {
+      type = 'Blob',
+      description = 'The Blob to fill with the vertex map data.'
+    }
+  },
   returns = {
   returns = {
-    {
-      name = 'map',
+    map = {
       type = 'table',
       type = 'table',
       description = 'The list of indices in the vertex map, or nil if no vertex map is set.'
       description = 'The list of indices in the vertex map, or nil if no vertex map is set.'
     }
     }
+  },
+  variants = {
+    {
+      arguments = {},
+      returns = { 't' }
+    },
+    {
+      arguments = { 't' },
+      returns = {}
+    },
+    {
+      arguments = { 'blob' },
+      returns = {}
+    }
   }
   }
 }
 }