- Don't use GLX extension functions unless they are supported on the
connection. GLEW only checks for client library support.
- Don't try to set swap interval using glXSwapIntervalSGI when vsync is
not requested.
Fixes https://gitlab.com/kicad/code/kicad/issues/11751
Mesa does not support adaptive swapping but will sometimes report that
it does. This prevents Mesa drivers from testing (and segfaulting) the
limits of their call
Fixes https://gitlab.com/kicad/code/kicad/issues/10069
(cherry picked from commit 100cf757fe)
Checking for the existence of the call only validated that our header
defined the value, not that the video card/driver supported the call.
We query the extensions string directly to check for support. This
should fix both the X11 and virtualization issues (potentially other
crashes with older video cards as well)
Fixes https://gitlab.com/kicad/code/kicad/issues/8944
(cherry picked from commit 7c9340f855)
On non-Unix, the platform selection is in platform.h, not on the command
line using the preprocessor macros from wx-config.
<wx/setup.h> relies on the platform being selected correctly, if it is
included directly, it cannot determine the correct configuration with
Visual Studio.
wxWidgets 3.1.5+ on Linux will compile with the Wayland EGL
canvas as the backend instead of the X11 backend. This requires a
version of GLEW compiled with the proper EGL defines and a different
header/code for certain parts that are X11 GLEW specific.
This introduces an in-tree version of GLEW that will be built with the
GLEW_EGL flag then statically linked into the KiCad executables when
EGL support is needed.
Swap syncs can limit the redraw rate as the screen waits for previously
issued syncs. Setting this to -1 allows for adaptive swapping
(resorting to unsynced if it falls behind) if it is supported by the
card but will fall back to unsynced (0) if the adaptive is not
supported.
Fixes https://gitlab.com/kicad/code/kicad/issues/4226