bjornbytes / lovr-docs

Documentation for LÖVR
44 stars 35 forks source link

Clarify possible values for mesh attribute names in newBuffer documentation #117

Open mcclure opened 1 year ago

mcclure commented 1 year ago

Consider https://lovr.org/docs/v0.16.0/lovr.graphics.newBuffer, case (data, format).

location is the vertex attribute location of each field. This is used to match up each field with an attribute declared in a shader, and doesn't have any purpose when binding the buffer as a uniform or storage buffer. Any fields with a nil location will use an autoincrementing location starting at zero. Named locations are not currently supported, but may be added in the future. [my emphasis]

There are two problems here. First off, contra the bolded text, the sample code uses named locations: https://lovr.org/docs/Intro/Custom_Mesh

So, either the text or the sample code should be changed.

Secondly, which locations/location names are valid by default is not documented anywhere linked from here. This bit of documentation should include a link to https://lovr.org/docs/v0.16.0/Shaders#vertex-attributes