Browse Source

Mesh:setMaterial takes Texture too;

bjorn 1 year ago
parent
commit
8c03f86097
2 changed files with 18 additions and 0 deletions
  1. 10 0
      api/init.lua
  2. 8 0
      api/lovr/graphics/Mesh/setMaterial.lua

+ 10 - 0
api/init.lua

@@ -14654,6 +14654,16 @@ return {
                     }
                     }
                   },
                   },
                   returns = {}
                   returns = {}
+                },
+                {
+                  arguments = {
+                    {
+                      name = "texture",
+                      type = "Texture",
+                      description = "The texture to use as the material."
+                    }
+                  },
+                  returns = {}
                 }
                 }
               }
               }
             },
             },

+ 8 - 0
api/lovr/graphics/Mesh/setMaterial.lua

@@ -5,6 +5,10 @@ return {
     material = {
     material = {
       type = 'Material',
       type = 'Material',
       description = 'The material to use.'
       description = 'The material to use.'
+    },
+    texture = {
+      type = 'Texture',
+      description = 'The texture to use as the material.'
     }
     }
   },
   },
   returns = {},
   returns = {},
@@ -12,6 +16,10 @@ return {
     {
     {
       arguments = { 'material' },
       arguments = { 'material' },
       returns = {}
       returns = {}
+    },
+    {
+      arguments = { 'texture' },
+      returns = {}
     }
     }
   },
   },
   related = {
   related = {