We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Am I doing something wrong here:
let fragment_shader_src = glassful! { #![version="140"] #[varying] static v_coord: vec3 = UNINIT; fn main() { if (abs(v_coord.z) == 0.25) { gl_FragColor = vec4(0., 1., 0., 1.); } else if (abs(v_coord.x) == 0.25) { gl_FragColor = vec4(0., 0., 1., 1.); } else if (abs(v_coord.y) == 0.25) { gl_FragColor = vec4(1., 0., 0., 1.); } } };
I get:
thread '<main>' panicked at 'called `Result::unwrap()` on an `Err` value: CompilationError("0:5(8): error: syntax error, unexpected IF\n")', ../src/libcore/result.rs:731```
The text was updated successfully, but these errors were encountered:
For reference, here's the original shader:
#version 140 in vec3 v_coord; out vec4 color; void main() { if (abs(v_coord.z) == 0.25) { color = vec4(0., 1., 0., 1.); } else if (abs(v_coord.x) == 0.25) { color = vec4(0., 0., 1., 1.); } else if (abs(v_coord.y) == 0.25) { color = vec4(1., 0., 0., 1.); } }
Sorry, something went wrong.
To be clear, this happens at runtime when creating a Program and unwrapping the result.
Program
No branches or pull requests
Am I doing something wrong here:
I get:
The text was updated successfully, but these errors were encountered: