Browse Source

Buffer length/stride/size;

unknown 3 years ago
parent
commit
ce49d168af

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


+ 16 - 0
api/lovr/graphics/Buffer/getLength.lua

@@ -0,0 +1,16 @@
+return {
+  summary = 'Get the length of the Buffer.',
+  description = 'Returns the length of the Buffer.',
+  arguments = {},
+  returns = {
+    {
+      name = 'length',
+      type = 'number',
+      description = 'The length of the Buffer.'
+    }
+  },
+  related = {
+    'lovr.graphics.getSize',
+    'lovr.graphics.getStride'
+  }
+}

+ 16 - 0
api/lovr/graphics/Buffer/getSize.lua

@@ -0,0 +1,16 @@
+return {
+  summary = 'Get the size of the Buffer, in bytes.',
+  description = 'Returns the size of the Buffer, in bytes.  This is the same as `length * stride`.',
+  arguments = {},
+  returns = {
+    {
+      name = 'size',
+      type = 'number',
+      description = 'The size of the Buffer, in bytes.'
+    }
+  },
+  related = {
+    'lovr.graphics.getLength',
+    'lovr.graphics.getStride'
+  }
+}

+ 19 - 0
api/lovr/graphics/Buffer/getStride.lua

@@ -0,0 +1,19 @@
+return {
+  summary = 'Get the distance between each item in the Buffer, in bytes.',
+  description = 'Returns the distance between each item in the Buffer, in bytes.',
+  arguments = {},
+  returns = {
+    {
+      name = 'stride',
+      type = 'number',
+      description = 'The stride of the Buffer, in bytes.'
+    }
+  },
+  notes = [[
+    // TODO zero-stride and straddled-stride
+  ]],
+  related = {
+    'lovr.graphics.getSize',
+    'lovr.graphics.getLength'
+  }
+}

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