25 Commits

Author SHA1 Message Date
Michal Suchánek
0c36e16292 Replace glew with epoxy
Glew has the problem that it has to be selected at build time if GLX or
EGL is supported by the library, and this in not encoded in the library
name, nor ABI, nor anything.

Then it's easy to get into the situation that a binary is built but
cannot run because glew supports an API different from the one used by
wxWidgets, or the binary fails to link in the end after all objects are
compiled.

epoxy can support both with the same library avoiding this problem.

epoxy is not initialized explicitly, replaced initialization with
version check where one was not done already.

It seems to be available as vcpkg https://vcpkg.link/ports/libepoxy

There are problems related to GL context switching on Windows which does
not seem to be used in kicad
https://github.com/anholt/libepoxy#known-issues-when-running-on-windows
There is also a problem related to multithreaded rendering on Windows
https://github.com/anholt/libepoxy/pull/265 It's harder to tell if
threading is used for rendering but it does not look like kicad is doing
anything complex enough to warrant using multiple rendering threads.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20630
Fixes https://gitlab.com/kicad/code/kicad/-/issues/12543
2025-04-22 12:54:39 -07:00
Seth Hillbrand
0b2d4d4879 Revise Copyright statement to align with TLF
Recommendation is to avoid using the year nomenclature as this
information is already encoded in the git repo.  Avoids needing to
repeatly update.

Also updates AUTHORS.txt from current repo with contributor names
2025-01-01 14:12:04 -08:00
Wayne Stambaugh
795a9eea60 Coding policy fixes.
This is primarily to change all instances of wxLogDebug with wxLogTrace
so developers do not have to sift through debugging output that is always
dumped.  The only exception is for code blocks built in debug builds and
called on demand for dumping object states.
2024-05-23 07:59:45 -04:00
Jeff Young
930c4e5582 Cleanup.
Formatting.
Naming conventions.
Use of auto.
Use of STL cover types.
2021-10-03 19:42:29 +01:00
Jonathan Haas
55679be2e3 Fix some typos across the codebase 2021-04-05 16:15:25 +02:00
Wayne Stambaugh
d96cccbf20 OpenGL GAL tracing improvements. 2021-03-22 17:45:49 -04:00
Wayne Stambaugh
e7227a4f21 GAL code cleaning. 2021-02-16 17:25:27 -05: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
Wayne Stambaugh
ede39780e2 Remove all debugging output that cannot be disabled.
The use of printf, wxLogDebug, and std::err/std::out causes excessive
debugging output which makes finding specific debugging messages more
difficult than it needs to be.

There is still some debugging output in test code that really needs to
be moved into a unit test.

Add debugging output section to the coding policy regarding debugging
output.
2020-08-18 10:17:36 -04:00
jean-pierre charras
3e287160d8 gal/opengl: better message for checkGlError() unknown error sub-type
in GL_INVALID_FRAMEBUFFER_OPERATION main error.
The returned error code is now printed in the error message.
2020-04-27 14:46:53 +02:00
Jeff Young
6c34fdefd7 Better exception handling and context locking for GAL.
This prevents deadlocks when exceptions are thrown and the context
ends up not getting unlocked.

It also removes an earlier hack to try and minimize this which
didn't work anyway.
2018-10-12 23:44:49 +01:00
Maciej Suminski
8a68a21570 Enable OpenGL debug output in debug builds 2018-02-09 16:20:38 +01:00
jean-pierre charras
8a1a3ed36c Better fix for compil problems in utils.cpp 2017-08-09 15:30:01 +02:00
jean-pierre charras
7ab6368869 Fix compil problems in utils.cpp, to be compatible with msys2/windows and linux. 2017-08-09 14:05:10 +02:00
Maciej Suminski
2697a21a7a Yet another try for correct function signature type cast 2017-08-08 15:26:50 +02:00
Maciej Suminski
ef6910faa9 Take two for satisyfing picky compilers (casting nullptr to void*) 2017-08-08 14:53:34 +02:00
Maciej Suminski
e91ce300fb Cast nullptr to const void* to satisfy picky compilers 2017-08-08 14:47:27 +02:00
Maciej Suminski
46b5575c51 OpenGL driver debug routines 2017-08-08 09:31:57 +02:00
jean-pierre charras
1f6854f2b8 Make internal errors messages not translatable 2017-08-01 13:12:59 +02:00
Oliver Walters
c27f5b725d Improved various error messages
- Moved developer "jargon" to details pane
- Changed error messages to "WHAT" rather than "WHY" or "WHERE"
2017-07-25 07:37:14 -04:00
Maciej Suminski
bf735b6fe7 Yet another trial to use wxString as a std::runtime_error message 2017-01-13 22:48:26 +01:00
Maciej Suminski
90710cfcc5 Added a missing #include directive 2017-01-13 17:15:32 +01:00
Maciej Suminski
e0577c0218 checkGlError() may throw exceptions or display an error message 2017-01-13 16:46:02 +01:00
Maciej Suminski
52c698ab11 Fixed an included header (OpenGL GAL). 2016-05-02 16:12:14 +02:00
Maciej Suminski
1927f3a787 Unified way of checking OpenGL errors. 2016-05-02 15:56:14 +02:00