Skip to content
New issue

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

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

Already on GitHub? # to your account

Include is cached despite changes #2

Open
JakubKoralewski opened this issue Jan 4, 2020 · 1 comment
Open

Include is cached despite changes #2

JakubKoralewski opened this issue Jan 4, 2020 · 1 comment

Comments

@JakubKoralewski
Copy link

Awesome crate, exactly what I was looking for. Is it still maintained? If not, is there a different way I can compile shaders at Rust compilation time?

Anyway, in wgpu_rs I use this code:

let vs = include_glsl_vs!("src/shader.vert");
let vs_module =
device.create_shader_module(&wgpu::read_spirv(std::io::Cursor::new(&vs[..])).unwrap());

let fs = include_glsl_fs!("src/shader.frag");
let fs_module =
device.create_shader_module(&wgpu::read_spirv(std::io::Cursor::new(&fs[..])).unwrap());

But when I make changes to e.g. shader.frag I have to change the name of the imported file for it to throw an error and then change it back to the correct name for it to recompile the spir-v data. If I don't do this the Rust compilation is almost instant and is using the previous (before the change) data.

@cheako
Copy link

cheako commented Mar 30, 2020

Looks abandoned, but I use it in a number of projects. There is one commit ready to be pulled and I'm planning on adding Ray Tracing.
#3 (comment)

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

No branches or pull requests

2 participants