GL differences - X11 vs Wayland (WSL2, in case that matters!)
imacarthur
Nov 30, 2022
Background to this is that I was testing a rebuilt Windows PC so I installed WIn11, then got carried away and installed WSL2 / Ubuntu.
Firstly, actually getting WSL2 installed was a lot more hassle than the docs suggested, but it works, and FLTK builds and runs OK. Now it works it start/stops much faster than VirtualBox if I need to spin a Linux instance for some tests.
It also has Wayland, which none of my "real" Linux boxes do!
I built the tip of fltk-1.4 from this morning, so it has the "dual" back-end. I then ran the tests and examples either with or without "FLTK_BACKEND=x11" to compare.
Most things Just Worked. There are some peculiarities though...
The window decorations look a bit odd; I assume that's our built-in libdecor? Not sure how to tell - in any case I think the title bar font is too large!
Apart from that, the majority of things seemed to be "the same" except:
- Under Wayland, the menus and choice drop-downs and so forth seem to jump about an awful lot, which is quite disconcerting. I assume that's a side effect of Wayland not providing any sensible mechanism for positioning a window? Looks pretty janky, anyway.
- There's some weird stuff going on with GL. Now, GL working at all is a step up (VirtualBox GL has never really worked for me!) but under X11 it works and seems broadly the same as I've seen on my "real" Linux boxes, albeit possible slower. Under Wayland, it seems even slower again (I was counting frame rate to try and measure that) and several of the tests (fractals, cube, glpuzzle) don't seem to have the background filled in, which is weird.
- The reported GL API in OpenGL3test is 3.3, which seems odd as the "native" Win11 build reports 4.6 - I guess that's something to do with the Mesa intermediary layer or such...
- Some tests (notably cube) run really slowly under Wayland; the same file invoked with
FLTK_BACKEND=x11 ./cube
runs quickly with the cubes whizzing about. (This is noticeable in the glpuzzle test too, if you tell it to solve, the X11 version whizzes, the Wayland version crawls...)
Comments are owned by the poster. All other content is copyright 1998-2025 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.