nanogui icon indicating copy to clipboard operation
nanogui copied to clipboard

Tweak CMakeLists.txt with necessary OpenGL and GLFW changes to get Linux/Wayland working

Open ashpil opened this issue 3 years ago • 1 comments

On my Wayland machine, if I supply the GLFW_USE_WAYLAND=ON option to cmake via the command line, this allows me to compile the code and run the resultant binary successfully.

I'm no cmake wizard, so I had some trouble getting this to work with the prior glfw_objects workflow -- instead, I switched nanogui to just use GLFW the way it recommends. As part of this, I switched the submodule to the main GLFW repository, as as far as I could tell, the custom features provided by the fork were no longer used. This means GLFW will be easier to update in the future.

I've tested this on Linux/X11 and Linux/Wayland, and I can confirm this works on both, but I don't have a Windows or Mac machine to test whether I broke something there.

I expect this to fix #103.

ashpil avatar Nov 01 '22 05:11 ashpil

Though its worth noting that in Wayland application window sizes are just requests, and the compositor gets priority, leading to this weirdness: 20221101_02h03m18s_grim Not sure what the current resizing story is in NanoGUI, though the scope of this pull request is just getting it to compile and run, not... run properly. I imagine non-tiling compositors (meaning, the more common type) won't experience this problem and everything will look as expected, though I haven't tested this theory.

For some projects I also get a different issue (the window not showing up at all despite program running), but I figure I'll investigate that once I get this actually merged in.

ashpil avatar Nov 01 '22 06:11 ashpil