1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-05 13:53:38 +00:00
lovr/test
bjorn b7765e9e15 Improve support for buffers with runtime-sized arrays;
- 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.
2024-06-23 00:18:58 -07:00
..
lovr Improve support for buffers with runtime-sized arrays; 2024-06-23 00:18:58 -07:00
conf.lua tests; 2024-06-14 16:59:04 -07:00
lust.lua tests; 2024-06-14 16:59:04 -07:00
main.lua tests; 2024-06-14 16:59:04 -07:00