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

ShaderSource::Glsl { defines } is underdocumented #2964

Open
kpreid opened this issue Aug 14, 2022 · 0 comments
Open

ShaderSource::Glsl { defines } is underdocumented #2964

kpreid opened this issue Aug 14, 2022 · 0 comments
Labels
area: documentation Documentation for crate items, public or private help required We need community help to make this happen. type: enhancement New feature or request

Comments

@kpreid
Copy link
Contributor

kpreid commented Aug 14, 2022

The documentation of ShaderSource::Glsl says:

defines: FastHashMap<String, String>
Defines to unlock configured shader features.

This only vaguely describes the purpose (What is a “feature”? How does a shader have them? What does “unlock” mean, formally?) but it does not tell the user what format of input to give it, or what to do if they are not using this functionality.

I would assume this does something equivalent to prepending format!("#define {key} {value}\n") to the shader source, but if so, it should say that — there's no need to be abstract, since we're talking about the specific language GLSL.

@cwfitzgerald cwfitzgerald added type: enhancement New feature or request help required We need community help to make this happen. area: documentation Documentation for crate items, public or private labels Aug 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: documentation Documentation for crate items, public or private help required We need community help to make this happen. type: enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants