Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mcclure opened this issue Mar 20, 2023 · 0 comments
Open
Labels

Comments

@mcclure
Copy link
Contributor

mcclure commented Mar 20, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants