-
Notifications
You must be signed in to change notification settings - Fork 207
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
Panic while using surfman to render in offscreen ? #270
Comments
Run with let window_size = Vector2I::new(640, 480);
GLContext::<NativeGLContext>::new_shared_with_dispatcher(
Size2D::new(window_size.x(), window_size.y()),
GLContextAttributes::default(),
ColorAttachmentType::default(),
sparkle::gl::GlType::Gl,
OffScreenGlVersion::MajorMinor(4, 1),
None,
None,
)
.unwrap();
gl::load_with(|name| GLContext::<NativeGLContext>::get_proc_address(name) as *const _);
let shaders_dir = PathBuf::from(env::current_dir().unwrap());
// Create a Pathfinder renderer.
let mut renderer = Renderer::new(
GLDevice::new(GLVersion::GL3, 0),
&FilesystemResourceLoader {
directory: shaders_dir,
},
DestFramebuffer::full_window(window_size),
RendererOptions {
background_color: Some(ColorF::white()),
},
); thread 'main' panicked at 'Vertex shader 'fill' compilation failed', /Users/longyinan/.cargo/git/checkouts/pathfinder-f0bd20e7aa700f92/67d12ad/gl/src/lib.rs:360:9
stack backtrace:
0: std::sys_common::at_exit_imp::push
1: core::fmt::ArgumentV1::show_usize
2: std::io::Write::write_fmt
3: std::panicking::default_hook::{{closure}}
4: std::panicking::default_hook
5: <std::panicking::begin_panic::PanicPayload<A> as core::panic::BoxMeUp>::get
6: std::panicking::try::do_call
7: std::panicking::begin_panic_fmt
at src/libstd/panicking.rs:326
8: <pathfinder_gl::GLDevice as pathfinder_gpu::Device>::create_shader_from_source
at /Users/longyinan/.cargo/git/checkouts/pathfinder-f0bd20e7aa700f92/67d12ad/gl/src/lib.rs:360
9: <pathfinder_gl::GLDevice as pathfinder_gpu::Device>::create_shader
at /Users/longyinan/.cargo/git/checkouts/pathfinder-f0bd20e7aa700f92/67d12ad/gl/src/lib.rs:818
10: pathfinder_gpu::Device::create_program_from_shader_names
at /Users/longyinan/.cargo/git/checkouts/pathfinder-f0bd20e7aa700f92/67d12ad/gpu/src/lib.rs:111
11: pathfinder_gpu::Device::create_program
at /Users/longyinan/.cargo/git/checkouts/pathfinder-f0bd20e7aa700f92/67d12ad/gpu/src/lib.rs:118
12: pathfinder_renderer::gpu::shaders::FillProgram<D>::new
at /Users/longyinan/.cargo/git/checkouts/pathfinder-f0bd20e7aa700f92/67d12ad/renderer/src/gpu/shaders.rs:299
13: pathfinder_renderer::gpu::renderer::Renderer<D>::new
at /Users/longyinan/.cargo/git/checkouts/pathfinder-f0bd20e7aa700f92/67d12ad/renderer/src/gpu/renderer.rs:130
14: canvas_bench::main
at src/main.rs:53
15: std::rt::lang_start::{{closure}}
at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/rt.rs:67
16: std::panicking::try::do_call
17: panic_unwind::dwarf::eh::read_encoded_pointer
18: std::panicking::rust_panic_without_hook
19: std::rt::lang_start
at /rustc/5e1a799842ba6ed4a57e91f7ab9435947482f7d8/src/libstd/rt.rs:67
20: canvas_bench::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. |
r-o-r-c is going to be replaced with http://github.com/pcwalton/surfman, and I want to replace SDL with that eventually. |
Switch to surfman I got the same error.
|
@pcwalton could you please help me with this issue? I'm doing a |
Close because it seems to be a bug in servo/surfman#163 |
If I want rendering canvas in Server, which don't have screen.
Could I use pathfinder with
rust-offscreen-rendering-context
?The text was updated successfully, but these errors were encountered: