You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
yew has html macro like this:
Which allows rust compiler to verify syntax of html code and even highlight errors. Referencing and invoking rust code inside html also works. I think it would be nice if glium had something similar.
I admit that it would be hard to implement such thing in glium, but still, it would greatly simplify implementing shader, as not only devs can work on it in rust file, but it can also be extended to treat uniforms also as variable reference
let t = 0.0;// this will be uniformlet shader = program!{
vertex! {
in vec2 position;
uniform float t;
void main(){
vec2 pos = position;
pos.x += t;
gl_Position = vec4(pos, 0.0, 1.0);
}}
fragment! {
...
}}
If variable t in this case is i32, it would cause compiler error
The text was updated successfully, but these errors were encountered:
Sorry, I should've researched more, I've just discovered that there's macro called program already.
Still, expanding its capability to such level would be nice addition
yew has html macro like this:
Which allows rust compiler to verify syntax of html code and even highlight errors. Referencing and invoking rust code inside html also works. I think it would be nice if glium had something similar.
I admit that it would be hard to implement such thing in glium, but still, it would greatly simplify implementing shader, as not only devs can work on it in rust file, but it can also be extended to treat uniforms also as variable reference
If variable t in this case is i32, it would cause compiler error
The text was updated successfully, but these errors were encountered: