Browse Source

Clarify stride requirements;

bjorn 3 years ago
parent
commit
ee27db2314
1 changed files with 5 additions and 1 deletions
  1. 5 1
      api/lovr/graphics/Buffer/getStride.lua

+ 5 - 1
api/lovr/graphics/Buffer/getStride.lua

@@ -10,7 +10,11 @@ return {
     }
     }
   },
   },
   notes = [[
   notes = [[
-    // TODO zero-stride and straddled-stride
+    When a Buffer is created, the stride can be set explicitly, otherwise it will be automatically
+    computed based on the fields in the Buffer.
+
+    Strides can not be zero, and can not be smaller than the size of a single item.  To work around
+    this, bind the Buffer as a storage buffer and fetch data from the buffer manually.
   ]],
   ]],
   related = {
   related = {
     'Buffer:getSize',
     'Buffer:getSize',