nix-community / nixGL

A wrapper tool for nix OpenGL application [maintainer=@guibou]
677 stars 78 forks source link

nixGLIntel: Add libGL to LD_LIBRARY_PATH #86

Closed Fuuzetsu closed 2 years ago

Fuuzetsu commented 2 years ago

We have an Rust application using imgui with glfw where nixGLIntel doesn't work: the application throws some issue about not being able to create a window. However, on this same machine, nixGLIntel <glxgears from nixpkgs> worked.

After trying to use apitrace and then strace, I noticed that it's trying to open libGL.so and then libGL.so.1 when that eventually fails. This however does not exist in the nixpkgs mesa package: https://github.com/NixOS/nixpkgs/issues/40001. There seems to have been some fixes regarding to the mesa change back in https://github.com/guibou/nixGL/issues/10 but presumably it didn't address this particular problem.

I am not sure if this is the correct fix for the issue: let me know if something else is supposed to be done, I'm not too privy as to how all this graphics stuff works. It seems to work for my use-case however.

I guess nixVulkanIntel doesn't need such treatment as it's only about OpenGL?

Fuuzetsu commented 2 years ago

Hm, maybe version I was trying it on top of was old...

Fuuzetsu commented 2 years ago

Oh, master was renamed to main, zz, let me fix the conflict.

guibou commented 2 years ago

Looks good to me. Thank you!