Skip to content
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

Headless glutin issue #58

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

goddessfreya
Copy link

@goddessfreya goddessfreya commented Mar 19, 2019

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
Copy link
Owner

bwasty commented Mar 25, 2019

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

@nick13jaremek
Copy link
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
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
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
Author

@nick13jaremek
Copy link
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