mirror of
https://github.com/bjornbytes/lovr.git
synced 2024-07-05 13:53:38 +00:00
b7765e9e15
- The last top-level field of a buffer can have a length of -1 to make it a "dynamic array". - When a buffer has a dynamic array, lovr tries to guess its length: - if no data is given or the data is a table and it's missing the key, the length defaults to 1. - if the data is a table and the table has a key with the array's name, the length of that table is used as the dynamic array's length - Note: This does not account for structs that are using integer keys (although this messes up length calculation anyway) - Note: This does not account for "flat" arrays that are using numbers for vector types. - if the data is a blob, use the size of the blob to figure out the length of the array. - Shader:getBufferFormat returns -1 for dynamic arrays that are nested inside of a struct. It still returns nil for the "main format length" if buffer just consists of a dynamic array. |
||
---|---|---|
.. | ||
lovr | ||
conf.lua | ||
lust.lua | ||
main.lua |