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

Enable Headless support #12

Open
siddhartpai opened this issue Feb 3, 2018 · 6 comments · May be fixed by #58
Open

Enable Headless support #12

siddhartpai opened this issue Feb 3, 2018 · 6 comments · May be fixed by #58

Comments

@siddhartpai
Copy link

Currently the gltf-viewer supports a faux headless mode where the window is made invisible while it's still running with the need of some kind a Xserver backend requirement. Is it possible to enable proper headless support so that the entire screenshot generation process could be run in an automated environment without the need of X .

@bwasty
Copy link
Owner

bwasty commented Feb 3, 2018

I've tried to do proper headless support, but had some trouble with the framebuffer (it remained black). I think it should work with some further debugging, there's probably only a tiny error somewhere.

The code is still there, you could try to get it working (I'd add a link to it, but I'm currently on mobile).

Otherwise I might try again, but I'm not sure when I'll find the time.

@siddhartpai
Copy link
Author

okay thanks @bwasty I'll look into it .

@bwasty
Copy link
Owner

bwasty commented Feb 5, 2018

Figured it out -> #14 (a gl::Viewport call was missing)
NOTE: I'm not entirely sure it will really work without an X server now. If not, there's always xvfb...

@bwasty
Copy link
Owner

bwasty commented Feb 11, 2018

To summarize #14 - 'real' headless mode now works fine on macOS, but not on Linux. It would require quite a bit of further debugging and possibly fixes to glutin to get working.

But #15 should provide a decent workaround 😃
EDIT: Final version is described in the readme: https://github.com/bwasty/gltf-viewer#headless-screenshot-generation.

@bwasty
Copy link
Owner

bwasty commented Feb 11, 2018

Created an issue for glutin: rust-windowing/glutin#988

@goddessfreya goddessfreya linked a pull request Mar 19, 2019 that will close this issue
@nick13jaremek
Copy link
Contributor

@bwasty It seems the headless issue was fixed in the glutin library on version 0.21.0. However, there seems to be lots of breaking changes that are not trivial to apply to gltf-viewer.

The PR that fixed the issue itself: rust-windowing/glutin#1125

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 a pull request may close this issue.

3 participants