Browse Source

Add missing Texture:newView variant;

bjorn 1 year ago
parent
commit
21c76a500b
2 changed files with 31 additions and 0 deletions
  1. 25 0
      api/init.lua
  2. 6 0
      api/lovr/graphics/Texture/newView.lua

+ 25 - 0
api/init.lua

@@ -23433,6 +23433,31 @@ return {
               },
               variants = {
                 {
+                  description = "Create a 2D texture view referencing a single layer and mipmap.",
+                  arguments = {
+                    {
+                      name = "layer",
+                      type = "number",
+                      description = "The index of the first layer in the view.",
+                      default = "1"
+                    },
+                    {
+                      name = "mipmap",
+                      type = "number",
+                      description = "The index of the first mipmap in the view.",
+                      default = "1"
+                    }
+                  },
+                  returns = {
+                    {
+                      name = "view",
+                      type = "Texture",
+                      description = "The new texture view."
+                    }
+                  }
+                },
+                {
+                  description = "Create a texture view with an explicit type, layer range, and mipmap range.",
                   arguments = {
                     {
                       name = "type",

+ 6 - 0
api/lovr/graphics/Texture/newView.lua

@@ -49,6 +49,12 @@ return {
   },
   variants = {
     {
+      description = 'Create a 2D texture view referencing a single layer and mipmap.',
+      arguments = { 'layer', 'mipmap' },
+      returns = { 'view' }
+    },
+    {
+      description = 'Create a texture view with an explicit type, layer range, and mipmap range.',
       arguments = { 'type', 'layer', 'layerCount', 'mipmap', 'mipmapCount' },
       returns = { 'view' }
     }