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
Triangles do not appear in headless-rendering on Ubuntu #369
Comments
Do you see any gl errors (appart from right after context creation). You can query for errors with |
Thanks for your comment. Yes, after the line,
I got |
I added many error-checking codes
before and after each ctx call, and confirmed that I also omitted the line |
Did you also remove the uniform from the shader code? Sorry about the details here, just need to narrow it down. |
Sorry, I misunderstood. Now I also deleted |
Just to sanity check the uniform, you could output its details. Then we'd know if it's the program inspection or the uniform itself. I do suspect this might be related to something outside of moderngl. mvp = prog['mvp']
print('name', mvp.name)
print('location', mvp.location)
print('dimension', mvp.dimension)
print('array_length', mvp.array_length)
print('value', mvp.value) outputs
I would also make sure the same version of pyrr and numpy are used on both systems to be sure. I can try to spin up a VM. |
My result was the same:
The versions of pyrr and numpy are:
|
@cprogrammer1994 Have any input on this one if you're not too busy? |
Uniforms are read or set with some non 3.3 core function if I remember correctly (must check) setting the uniforms require glProgramUniform to be implemented despite 3.3 core is requested. Please check with some other libraries if the
|
Works for me on ubuntu 19 with llvmpipe driver 9.0 |
@cprogrammer1994 Thank you very much for your comment. But may I ask you how I can confirm whether |
To add more info about a working setup (Ubuntu 19.04 or 19.10). It may work better out of the box with ubuntu 18 as well.
It's hard to say if it's lvvm, mesa or something else. |
You can give EGL a try when we release 5.6. Very soon. |
@einarf : I send a PR on cprogrammer1994/Headless-rendering-with-python to fix scripts and some unit tests + CI. |
Nice. I don't have access to that repo and I think cprogrammer1994 are fairly busy these days. Ci stuff goes here: #377 |
@yshhrknmr https://moderngl.readthedocs.io/en/latest/the_guide/headless_ubunut18_server.html Definitely works on ubuntu 18 server. Optionally you can try to install a more recent version of mesa. |
Closing this as it seems like a driver issue. We've added guide in docs and updated the headless repo. |
Description
With reference to the following URLs, I wrote some headless-rendering codes. The codes worked on Windows 10, but didn't on Ubuntu 16.04. It seems that ctx.clear() works but vao.render() doesn't.
Proof of code
Here's a short version of my headless-rendering code:
http://kanamori.cs.tsukuba.ac.jp/tmp/moderngl/sample.py
yields the following white image:
http://kanamori.cs.tsukuba.ac.jp/tmp/moderngl/output_ubuntu.png
Expected behavior
On Windows 10, I got the following image as expected.
http://kanamori.cs.tsukuba.ac.jp/tmp/moderngl/output_windows.png
Version info
Here's also a log of glxinfo:
http://kanamori.cs.tsukuba.ac.jp/tmp/moderngl/glxinfo_dump.txt
The text was updated successfully, but these errors were encountered: