Browse Source

Texture dimensions;

bjorn 3 years ago
parent
commit
a5130f7204

File diff suppressed because it is too large
+ 205 - 205
api/init.lua


+ 21 - 0
api/lovr/graphics/Texture/getDepth.lua

@@ -0,0 +1,21 @@
+return {
+  summary = 'Get the depth of the Texture.',
+  description = [[
+    Returns the depth of the Texture.  2D textures always have a depth of 1 and cubemap textures
+    always have a depth of 6.  For 3D and array textures, this is the number of images stored in the
+    texture.  3D textures represent a spatial 3D volume, whereas array textures are multiple layers
+    of distinct 2D images.
+  ]],
+  arguments = {},
+  returns = {
+    {
+      name = 'depth',
+      description = 'The depth of the Texture.'
+    }
+  },
+  related = {
+    'Texture:getWidth',
+    'Texture:getHeight',
+    'Texture:GetDimensions'
+  }
+}

+ 24 - 0
api/lovr/graphics/Texture/getDimensions.lua

@@ -0,0 +1,24 @@
+return {
+  summary = 'Get the dimensions of the Texture.',
+  description = 'Returns the width, height, and depth of the Texture.',
+  arguments = {},
+  returns = {
+    {
+      name = 'width',
+      description = 'The width of the Texture.'
+    },
+    {
+      name = 'height',
+      description = 'The height of the Texture.'
+    },
+    {
+      name = 'depth',
+      description = 'The depth of the Texture.'
+    }
+  },
+  related = {
+    'Texture:getWidth',
+    'Texture:getHeight',
+    'Texture:getDepth'
+  }
+}

+ 16 - 0
api/lovr/graphics/Texture/getHeight.lua

@@ -0,0 +1,16 @@
+return {
+  summary = 'Get the height of the Texture, in pixels.',
+  description = 'Returns the height of the Texture, in pixels.',
+  arguments = {},
+  returns = {
+    {
+      name = 'height',
+      description = 'The height of the Texture, in pixels.'
+    }
+  },
+  related = {
+    'Texture:getWidth',
+    'Texture:getDepth',
+    'Texture:GetDimensions'
+  }
+}

+ 16 - 0
api/lovr/graphics/Texture/getWidth.lua

@@ -0,0 +1,16 @@
+return {
+  summary = 'Get the width of the Texture, in pixels.',
+  description = 'Returns the width of the Texture, in pixels.',
+  arguments = {},
+  returns = {
+    {
+      name = 'width',
+      description = 'The width of the Texture, in pixels.'
+    }
+  },
+  related = {
+    'Texture:getHeight',
+    'Texture:getDepth',
+    'Texture:GetDimensions'
+  }
+}

Some files were not shown because too many files changed in this diff