Skip to content

Headless glutin issue - #58

Open
goddessfreya wants to merge 3 commits into
bwasty:masterfrom
goddessfreya:headless_glutin_issue
Open

Headless glutin issue#58
goddessfreya wants to merge 3 commits into
bwasty:masterfrom
goddessfreya:headless_glutin_issue

Conversation

@goddessfreya

@goddessfreya goddessfreya commented Mar 19, 2019

Copy link
Copy Markdown

Ports to upcoming glutin 0.21 release. Fixes headless issues. Fixes #12. Based on the headless_glutin_issue branch. Feel free to cherry-pick the necessary changes you want to keep.

Dependent on: rust-windowing/glutin#1125

Resolves rust-windowing/glutin#988, afaik.

@bwasty

bwasty commented Mar 25, 2019

Copy link
Copy Markdown
Owner

Thanks a lot! I don't have time to take a proper look at the moment, but hopefully soon.

@nick13jaremek

Copy link
Copy Markdown
Contributor

@zegentzy Nice PR, just what I was looking for!

However, I don't understand why did you remove the glutin dependency and referenced a local glutin directory which does not exist, in the Cargo.toml file. Perhaps I am missing something here?

This could be related to the TravisCI build error.

@goddessfreya

Copy link
Copy Markdown
Author

Glutin 0.21 was not out at the time, so I was using a local copy. Should be fine to just change the version now.

@nick13jaremek

Copy link
Copy Markdown
Contributor

@zegentzy I updated the Cargo.toml file to explicitly use the 0.21.0 version of glutin, but the cargo build command failed with the error messages shown below.

Perhaps there were some changes in the 0.21.0 glutin crate development cycle from beta to final?

I am using Rust 1.36.0.

error[E0432]: unresolved import `glutin::ContextTrait`
  --> src/viewer.rs:16:5
   |
16 |     ContextTrait,
   |     ^^^^^^^^^^^^
   |     |
   |     no `ContextTrait` in the root
   |     help: a similar name exists in the module: `ContextError`

error[E0107]: wrong number of type arguments: expected 1, found 0
  --> src/viewer.rs:60:23
   |
60 |     gl_window: Option<glutin::WindowedContext>,
   |                       ^^^^^^^^^^^^^^^^^^^^^^^ expected 1 type argument

error[E0107]: wrong number of type arguments: expected 1, found 0
  --> src/viewer.rs:61:29
   |
61 |     pub _gl_context: Option<glutin::Context>,
   |                             ^^^^^^^^^^^^^^^ expected 1 type argument

error[E0107]: wrong number of type arguments: expected 1, found 0
   --> src/viewer.rs:391:17
    |
391 |     gl_window: &glutin::WindowedContext,
    |                 ^^^^^^^^^^^^^^^^^^^^^^^ expected 1 type argument

error: aborting due to 4 previous errors

Some errors have detailed explanations: E0107, E0432.
For more information about an error, try `rustc --explain E0107`.
error: Could not compile `gltf-viewer`.

To learn more, run the command again with --verbose.

@goddessfreya

Copy link
Copy Markdown
Author

@nick13jaremek

Copy link
Copy Markdown
Contributor

@zegentzy Oh, nice! Did not know about that guide. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable Headless support Headless rendering broken on Linux

3 participants