Commit Graph

10 Commits

Author SHA1 Message Date
Seth Hillbrand f4d12fb19c Force Mesa to use its own call
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)
2022-01-08 17:13:52 -08:00
Seth Hillbrand 3a730361d3 Fix swap interval checking
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)
2022-01-06 10:53:44 -08:00
Seth Hillbrand a153951be4 Don't set adaptive swapping over SSH
Remote connection GL drivers lie.  Don't trust them to support any
swapping other than their default

Fixes https://gitlab.com/kicad/code/kicad/issues/9532
2021-11-05 09:06:22 -07:00
Alexander Guy 59ad333650 Check that the OpenGL drawable supports negative frame swap intervals 2021-08-13 21:11:41 +00:00
Wayne Stambaugh a1fae02427 Header clean up round 2. 2020-12-19 13:55:28 -05:00
Simon Richter 731e56a474 Use <wx/platform.h> instead of <wx/setup.h>
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.
2020-11-12 12:05:19 +00:00
Ian McInerney 11e6cac42b Introduce EGL backend support for the OpenGL canvas
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.
2020-11-11 00:41:02 +00:00
Seth Hillbrand 2f01dedb69 Modify glx sync to be Linux only.
Mac glxew seems to require X11, which we don't use.
2020-07-03 11:17:56 -07:00
jean-pierre charras 286c36b7da gl_utils.h: fix compil issue on Windows
__WINDOWS__ is defined in wxWidgets.
the right preprocessor symbol is _WIN32 for Windows 32/64 bits
2020-07-03 17:12:36 +02:00
Seth Hillbrand a210fd570f Set VSYNC to adaptive (if available)
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
2020-07-03 13:27:48 +00:00