servo / pathfinder

A fast, practical GPU rasterizer for fonts and vector graphics
Apache License 2.0
3.52k stars 198 forks source link

Can not locate shaders and other resources #533

Open darmie opened 1 year ago

darmie commented 1 year ago

I copied the resources folder from the repository into my project, but when I run the project it crashes.

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }', /Users/amaterasu/.cargo/registry/src/github.com-1ecc6299db9ec823/pathfinder_gl-0.5.0/src/lib.rs:717:70
stack backtrace:
   0: rust_begin_unwind
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/std/src/panicking.rs:584:5
   1: core::panicking::panic_fmt
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/panicking.rs:143:14
   2: core::result::unwrap_failed
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/result.rs:1785:5
   3: core::result::Result<T,E>::unwrap
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/result.rs:1078:23
   4: <pathfinder_gl::GLDevice as pathfinder_gpu::Device>::create_shader
             at /Users/amaterasu/.cargo/registry/src/github.com-1ecc6299db9ec823/pathfinder_gl-0.5.0/src/lib.rs:717:47
   5: pathfinder_gpu::Device::create_program_from_shader_names
             at /Users/amaterasu/.cargo/registry/src/github.com-1ecc6299db9ec823/pathfinder_gpu-0.5.0/src/lib.rs:113:29
   6: pathfinder_gpu::Device::create_program
             at /Users/amaterasu/.cargo/registry/src/github.com-1ecc6299db9ec823/pathfinder_gpu-0.5.0/src/lib.rs:120:9
   7: pathfinder_renderer::gpu::shaders::FillProgram<D>::new
             at /Users/amaterasu/.cargo/registry/src/github.com-1ecc6299db9ec823/pathfinder_renderer-0.5.0/src/gpu/shaders.rs:296:23
   8: pathfinder_renderer::gpu::renderer::Renderer<D>::new
             at /Users/amaterasu/.cargo/registry/src/github.com-1ecc6299db9ec823/pathfinder_renderer-0.5.0/src/gpu/renderer.rs:167:28
   9: zflow_editor::main
             at ./src/main.rs:138:24
  10: core::ops::function::FnOnce::call_once
             at /rustc/fe5b13d681f25ee6474be29d748c65adcd91f69e/library/core/src/ops/function.rs:227:5