Browse Source

Add missing readable argument to lovr.graphics.newMesh;

bjorn 5 years ago
parent
commit
25f917bc6e
2 changed files with 47 additions and 6 deletions
  1. 36 0
      api/init.lua
  2. 11 6
      api/lovr/graphics/newMesh.lua

+ 36 - 0
api/init.lua

@@ -8112,6 +8112,12 @@ return {
                   type = "MeshUsage",
                   description = "An optimization hint indicating how often the data in the Mesh will be updated.",
                   default = "'dynamic'"
+                },
+                {
+                  name = "readable",
+                  type = "boolean",
+                  description = "Whether vertices from the Mesh can be read.",
+                  default = "false"
                 }
               },
               returns = {
@@ -8140,6 +8146,12 @@ return {
                   type = "MeshUsage",
                   description = "An optimization hint indicating how often the data in the Mesh will be updated.",
                   default = "'dynamic'"
+                },
+                {
+                  name = "readable",
+                  type = "boolean",
+                  description = "Whether vertices from the Mesh can be read.",
+                  default = "false"
                 }
               },
               returns = {
@@ -8168,6 +8180,12 @@ return {
                   type = "MeshUsage",
                   description = "An optimization hint indicating how often the data in the Mesh will be updated.",
                   default = "'dynamic'"
+                },
+                {
+                  name = "readable",
+                  type = "boolean",
+                  description = "Whether vertices from the Mesh can be read.",
+                  default = "false"
                 }
               },
               returns = {
@@ -8202,6 +8220,12 @@ return {
                   type = "MeshUsage",
                   description = "An optimization hint indicating how often the data in the Mesh will be updated.",
                   default = "'dynamic'"
+                },
+                {
+                  name = "readable",
+                  type = "boolean",
+                  description = "Whether vertices from the Mesh can be read.",
+                  default = "false"
                 }
               },
               returns = {
@@ -8235,6 +8259,12 @@ return {
                   type = "MeshUsage",
                   description = "An optimization hint indicating how often the data in the Mesh will be updated.",
                   default = "'dynamic'"
+                },
+                {
+                  name = "readable",
+                  type = "boolean",
+                  description = "Whether vertices from the Mesh can be read.",
+                  default = "false"
                 }
               },
               returns = {
@@ -8268,6 +8298,12 @@ return {
                   type = "MeshUsage",
                   description = "An optimization hint indicating how often the data in the Mesh will be updated.",
                   default = "'dynamic'"
+                },
+                {
+                  name = "readable",
+                  type = "boolean",
+                  description = "Whether vertices from the Mesh can be read.",
+                  default = "false"
                 }
               },
               returns = {

+ 11 - 6
api/lovr/graphics/newMesh.lua

@@ -26,6 +26,11 @@ return {
         An optimization hint indicating how often the data in the Mesh will be updated.
       ]]
     },
+    readable = {
+      type = 'boolean',
+      default = 'false',
+      description = 'Whether vertices from the Mesh can be read.'
+    },
     vertices = {
       type = 'table',
       description = 'A table of vertices.  Each vertex is a table containing the vertex data.'
@@ -47,30 +52,30 @@ return {
   },
   variants = {
     {
-      arguments = { 'size', 'mode', 'usage' },
+      arguments = { 'size', 'mode', 'usage', 'readable' },
       returns = { 'mesh' }
     },
     {
-      arguments = { 'vertices', 'mode', 'usage' },
+      arguments = { 'vertices', 'mode', 'usage', 'readable' },
       returns = { 'mesh' }
     },
     {
-      arguments = { 'blob', 'mode', 'usage' },
+      arguments = { 'blob', 'mode', 'usage', 'readable' },
       returns = { 'mesh' }
     },
     {
       description = [[
         These variants accept a custom vertex format.  For more info, see the `Mesh` page.
       ]],
-      arguments = { 'format', 'size', 'mode', 'usage' },
+      arguments = { 'format', 'size', 'mode', 'usage', 'readable' },
       returns = { 'mesh' }
     },
     {
-      arguments = { 'format', 'vertices', 'mode', 'usage' },
+      arguments = { 'format', 'vertices', 'mode', 'usage', 'readable' },
       returns = { 'mesh' }
     },
     {
-      arguments = { 'format', 'blob', 'mode', 'usage' },
+      arguments = { 'format', 'blob', 'mode', 'usage', 'readable' },
       returns = { 'mesh' }
     }
   },