Browse Source

TextureData:getFormat;

bjorn 6 years ago
parent
commit
862fadf058
2 changed files with 39 additions and 0 deletions
  1. 23 0
      api/init.lua
  2. 16 0
      api/lovr/data/TextureData/getFormat.lua

+ 23 - 0
api/init.lua

@@ -3251,6 +3251,29 @@ return {
                 }
               }
             },
+            {
+              name = "getFormat",
+              summary = "Get the pixel format of the TextureData.",
+              description = "Returns the format of the TextureData.",
+              key = "TextureData:getFormat",
+              module = "lovr.data",
+              related = {
+                "TextureFormat",
+                "Texture:getFormat"
+              },
+              variants = {
+                {
+                  arguments = {},
+                  returns = {
+                    {
+                      name = "format",
+                      type = "TextureFormat",
+                      description = "The format of the TextureData."
+                    }
+                  }
+                }
+              }
+            },
             {
               name = "getHeight",
               summary = "Get the height of the TextureData.",

+ 16 - 0
api/lovr/data/TextureData/getFormat.lua

@@ -0,0 +1,16 @@
+return {
+  summary = 'Get the pixel format of the TextureData.',
+  description = 'Returns the format of the TextureData.',
+  arguments = {},
+  returns = {
+    {
+      name = 'format',
+      type = 'TextureFormat',
+      description = 'The format of the TextureData.'
+    }
+  },
+  related = {
+    'TextureFormat',
+    'Texture:getFormat'
+  }
+}