7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-18 09:09:17 +00:00
Commit Graph

214 Commits

Author SHA1 Message Date
Seth Hillbrand
09e30adbb1 Move GL_CONTEXT_MGR into PGM_BASE singleton
This is the second try at 5326c36a5f.  The difference here is that we
have moved GL_CONTEXT_MGR into kicommon first which will hopefully
address some of the Windows linkage issues

The GL context lock needs to be shared across kifaces.  Otherwise, we
can end up blocking the lock from one kiface.  Unfortunately, I can't
find the issue in GitLab right now for where the footprint viewer shows
a blank screen after opening too many contexts.  But that's what this
fixes.
2025-01-09 09:03:08 -08:00
Seth Hillbrand
d48c40ba26 Move GL_CONTEXT_MANAGER to kicommon 2025-01-09 09:03:08 -08:00
Wayne Stambaugh
89db935910 Housekeeping in include path sub-folders. 2025-01-04 09:21:11 -05:00
Seth Hillbrand
f38e661a02 Revert "Move GL Context into Singleton class"
This reverts commit 5326c36a5f.
2025-01-03 21:22:37 -08:00
Seth Hillbrand
5326c36a5f Move GL Context into Singleton class
The GL context lock needs to be shared across kifaces.  Otherwise, we
can end up blocking the lock from one kiface.  Unfortunately, I can't
find the issue in GitLab right now for where the footprint viewer shows
a blank screen after opening too many contexts.  But that's what this
fixes.
2025-01-03 17:26:23 -08: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
Seth Hillbrand
be2a52dd2b Avoid GL ctx deadlock
Allow non-drawing routines to access error messages without dealocking
the load
2024-09-06 16:00:49 -07:00
Alex Shvartzkop
1bb507e3c4 Reduce VERTEX_ITEM size by removing vfptr.
24 -> 16 bytes.
2024-06-20 19:08:07 +03:00
Alex Shvartzkop
8f8a68229c Handle touchscreen gesture events for zoom/pan. 2024-06-08 16:00:34 +03:00
Alex Shvartzkop
cf7ad330e9 Fix some platform ifdef checks. 2024-06-01 06:49:11 +03:00
Seth Hillbrand
ab0426d620 Detect if HiDPI cursors are needed
HiDPI cursors are twice as large as regular cursors, allowing them to be
more easily seen on a HiDPI system

Fixes https://gitlab.com/kicad/code/kicad/-/issues/16231
2024-05-26 07:51:15 -07:00
Marek Roszko
4746bde4b3 gal as a shared lib, gaasl! 2023-09-26 22:31:31 -04:00
Marek Roszko
ee91b550d8 gl_context_mgr and gl_util belong in the gal folder 2023-09-19 23:06:44 -04:00
Marek Roszko
a6a20bf8dc Evict the Pgm() dependency in GAL 2023-09-06 20:13:46 -04:00
Alex Shvartzkop
10e2e4a12d Another try at fixing arcs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15471
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15469
2023-08-22 16:10:58 +03:00
Kuba Sunderland-Ober
1edb9bb0ce Get rid of VECTOR2U. 2023-06-28 20:48:07 +00:00
Alex
dcb131c20d Improve canvas responsiveness by better swap interval management. 2022-11-18 00:32:25 +05:00
Alex
399aa7e418 Implement SetSwapInterval on Windows. 2022-11-18 00:32:25 +05:00
dsa-t
bd8b737c44 GAL: Do better job at reserving vertices. 2022-09-14 16:07:47 +00:00
Mike Williams
3669cb4673 PCB Editor: Add User Background Images 2022-07-14 11:23:23 +00:00
Marek Roszko
8288f24264 Move all the shaders to glsl files (and fix the processor more) 2022-05-12 23:37:44 -04:00
Jeff Young
e84c574830 Some more EDA_ANGLE cleanup. 2022-01-16 19:16:18 +00:00
Jeff Young
93229c37bb Fix compile issue on Mac.
See https://kicad.zulipchat.com/#narrow/stream/216775-core-team/topic/Compile.20error
2022-01-14 20:53:25 +00:00
Mark Roszko
3aff953c9c Quietly put the missing [] in the shared_ptr 2022-01-13 13:50:57 +00:00
Marek Roszko
15dc1b3a38 Remove no longer used boost header 2022-01-13 07:12:13 -05:00
Marek Roszko
9965748795 Use std::shared_ptr in place of boost::shared_array
It works the same here
2022-01-13 07:10:47 -05:00
Jeff Young
8f7d2dd06a More VECTOR2D -> VECTOR2I and wxPoint cleanup. 2022-01-11 14:20:14 +00:00
Jeff Young
04c76f10e9 Performance enhancements for fonts. 2022-01-08 16:47:45 +00:00
Ola Rinta-Koski
9b406c1da4 Outline font support. 2022-01-08 16:47:45 +00:00
Mike Williams
404659d275 Gerbview: Fix diff mode issues with OpenGL transparency
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10121
2022-01-02 23:15:36 +00:00
Jeff Young
89c0f8e297 Move to new font engine. 2022-01-02 14:57:03 +00:00
Tomasz Wlostowski
2c6e9778a1 GAL: OpenGL draw calls pooling/splitting
Improves rendering performance, esp. for large designs by:
- using a separate glDrawArrays calls() for large buffers of contiguous vertices (e.g. large zone fills)
- pooling smaller items into a small-sized index buffer held in system RAM (has to be DMAed to the GPU by the driver anyway)
2021-11-29 23:30:10 +01:00
Tomasz Wlostowski
569c39ac37 GAL: runtime profiling for CACHED_CONTAINER 2021-11-29 23:30:10 +01:00
Tomasz Wlostowski
b59ee13fcc GAL: made Begin/EndDrawing calls public to have more control over timing of rendering context creation/destruction 2021-11-29 23:30:10 +01:00
jean-pierre charras
56374ffa26 Try to fix a compil issue that does not happen on my computers. 2021-09-06 18:36:27 +02:00
jean-pierre charras
36048fa436 OPENGL_GAL::DrawArcSegment(): use a better number of segm to approximate the arc.
Previously, the count of segments used a magic number optimized for Pcbnew.
This is not good, and does not work well on Gerbview.
The count uses now a max error acceptable is approximation (5 microns in Gerbview and Pcbnew).
Fixes 
https://gitlab.com/kicad/code/kicad/issues/9101
2021-09-06 16:36:47 +02:00
Mike Williams
30987cebfe Gerbview: fix cairo negative items and implement real differential mode
Layers with negative objects need to be drawn in a subsurface before
copying so they don't _CLEAR the draw items below them when a negative
object is drawn.

Differential layers are basically the same thing only they use a
different copying operation onto the layers below.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/1863
Fixes https://gitlab.com/kicad/code/kicad/-/issues/4495
2021-08-31 12:43:53 +00:00
Jeff Young
e62969d007 Move zone fracture display mode to AdvancedCfg, and add triangulation.
Fixes https://gitlab.com/kicad/code/kicad/issues/8762
2021-07-26 18:57:35 +01:00
Marek Roszko
eff75b630f Get rid of anonymous struct typedefs
We are using C++14 where there is no reason for this and is banned in C++20 under P1766R1. MSVC generates a warning under C++14 as a reminder.
2021-07-01 18:28:41 -04:00
luz paz
f968fc8719 Fix source comment / documentation typos 2021-06-09 19:32:58 +00:00
jean-pierre charras
2078483f50 Fix incorrect test of wxUSE_GLCANVAS_EGL (Linux).
in wxWidgets 3.1.5 wxUSE_GLCANVAS_EGL is always defined (set to 0 or to 1)
So using "ifdef wxUSE_GLCANVAS_EGL" is incorrect.
2021-06-06 16:10:35 +02:00
Marek Roszko
e234e4dc8b Remove wx/log.h from vertex_manager.h 2021-06-06 09:31:00 -04:00
Hajo Nils Krabbenhöft
937f502158 Improve accelerated supersampling 2x antialiasing
Avoid fractional pixel offsets by forcing integer division of m_screenSize.
Shift rounded lookAtPoint onto OpenGL pixel center to ensure consistent rounding to int.
The pixel 0..1 @ 1x needs to fill the area 0..2 @ 2x so its center moves by 0.5 * (pixel size @ 1x).
2021-06-03 17:53:51 +00:00
Ian McInerney
e08387ce3d Make the GAL responsible for the native cursor management
The native cursor must be set on the GAL canvas wx object,
not its frame (otherwise on GTK the cursor is only set
when we get a request for it from the WM and not immediately).

Fixes https://gitlab.com/kicad/code/kicad/issues/6421
2021-04-05 02:36:12 +01:00
Marcus A. Romer
1632707d9b Replace tabs with spaces 2021-04-05 01:13:39 +00:00
Wayne Stambaugh
d96cccbf20 OpenGL GAL tracing improvements. 2021-03-22 17:45:49 -04:00
Jeff Young
812d38736e Naming conventions. 2021-03-19 23:06:19 +00:00
Wayne Stambaugh
be8327bd54 GAL memory allocation fixes.
Vertex memory allocation uses malloc and realloc without checking the
result.  Throw exceptions that can be caught in the DoRepaint() method
in EDA_DRAW_PANEL_GAL when malloc and realloc return a null pointer.
2021-02-22 08:15:09 -05:00
Wayne Stambaugh
6ab1144ea3 Fix broken Doxygen comment specifiers.
Please note, ///> is not a valid Doxygen comment specifier.  ///< is the
correct specifier to use for single line or short Doxygen comments.
2021-01-25 07:42:36 -05:00
Seth Hillbrand
ffb3748cfc Don't crash when getting multiple wx calls
Multiple size calls will assert trying to re-lock the GAL context.  Just
skip the second one.
2021-01-09 13:05:58 -08:00