dsa-t
17f220590b
OpenGL: Use glGetProgramiv instead of the extension function.
...
(cherry picked from commit 3a76435eda
)
2022-07-18 10:20:04 -07:00
Seth Hillbrand
861589d837
Use wxEmptyString instead of wxT( "" )
...
Also fixes places where ternaries did autopromotion instead of returning
an empty wxString
2022-02-09 10:33:52 -08:00
Seth Hillbrand
e18fc36646
wxT rework for common directory
2022-02-04 16:24:50 -08:00
Wayne Stambaugh
ab184ba9f3
Fix wxWidgets invalid string specifier assertion.
2022-01-24 15:44:42 -05:00
Mike Williams
e36381bdd2
Gerbview: Fix diff mode issues with OpenGL transparency
...
Fixes: https://gitlab.com/kicad/code/kicad/-/issues/10121
(cherry picked from commit 404659d275
)
2022-01-02 18:18:00 -05:00
Jon Evans
a205595404
PROF_COUNTER -> PROF_TIMER
...
I want to add an event counter, and this one is a timer
2021-12-05 14:25:37 -05:00
jean-pierre charras
f24bdf4067
Fix minor Coverity warnings (not initialized vars).
2021-12-03 17:55:21 +01:00
Tomasz Wlostowski
691ca11b5a
DRAW_PANEL_GAL: add profiling counter for OGL buffer swap
2021-11-29 23:30:10 +01: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
9518d425ca
OPENGL_GAL: added runtime render speed profiling
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
Jeff Young
930c4e5582
Cleanup.
...
Formatting.
Naming conventions.
Use of auto.
Use of STL cover types.
2021-10-03 19:42:29 +01:00
Marek Roszko
91e456113f
Use StartsWith instead of Contains for the Intel check
2021-09-20 18:56:06 -04:00
Marek Roszko
1b8259701e
Expand "Intel" GL_VENDOR check for workaround
...
Fix #7444 maybe
2021-09-20 18:20:57 -04: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 #9101
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
jean-pierre charras
f59e66a897
Do not include kicad_curl.h (and therefore curl.h) in kicad_curl_easy.h
...
curl.h has constraints on Windows (because it includes winsocks2.h) and must be
included before any wxxxx.h.
Because only very few files need curl.h, kicad_curl.h is included only in these files
2021-08-28 15:31:45 +02:00
Mike Williams
ff9612b6da
OpenGL GAL: Enter correct context (and lock) before changing AA mode
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8528
2021-08-26 18:03:50 +00:00
david-beinder
bab13debcb
Improve overbar rendering in PCB and global labels
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8584
Moves the font slightly down in global labels
Keeps font with overbar at the same size in PCB OpenGL renderer
2021-08-02 16:40:36 +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
Wayne Stambaugh
bcd6bddfd4
Start expunging NULL.
...
Given that KiCad is a C++ project, we should really be using nullptr
instead of NULL.
2021-07-15 15:44:45 -04:00
Mikolaj Wielgus
2af06a9d60
Fix stroke text size calculation and bitmap text overbar
...
Fixes bug 1 from https://gitlab.com/kicad/code/kicad/-/issues/8591 .
Fixes a bug where no overbar would appear in bitmap text.
2021-06-14 09:09:30 +00:00
Jeff Young
9328c78b08
Fix issue with overbars in bitmap text.
2021-06-12 11:49:12 +01:00
Mikolaj Wielgus
3d520ebe1e
Replace `~...~` overbar syntax with `~{...}`
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8134
Fixes https://gitlab.com/kicad/code/kicad/issues/4227
2021-06-11 18:40:57 +00:00
luz paz
f968fc8719
Fix source comment / documentation typos
2021-06-09 19:32:58 +00:00
Seth Hillbrand
ea283625a7
Further simplification of AA regime
...
Reduce each (Accel & Fallback) to 3 options: Off, Fast, Good. Fast AA
in accelerated canvas uses SMAA with tweaks suggested by David Beinder.
Good AA is super-sampled x2.
Cairo is similarly reduced to Off, Fast, Good, which map to the Cairo
options themselves. Best is removed as it mostly affects text rendering
and not line drawing (as our text is)
2021-06-08 17:20:41 -07:00
Seth Hillbrand
0a31e2d4fd
Tweak AA settings for fast/balanced SMAA
2021-06-07 09:40:14 -07:00
Marek Roszko
e234e4dc8b
Remove wx/log.h from vertex_manager.h
2021-06-06 09:31:00 -04:00
david-beinder
2b4564571c
GAL: Tune SMAA to have a conservative and aggressive mode
...
Fixes https://gitlab.com/kicad/code/kicad/-/issues/8522
Conservative makes SMAA usable in Eeschema through weaker AA.
Aggressive reduces some artifacts compared to the High preset.
Restores the unused Ultra preset in the shader source to its original state.
2021-06-04 17:48:34 +00: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
Marek Roszko
cf2bb5692a
Remove the wxLog calls from math/util.h for now
...
This was leaking windows headers and partial wx headers to 1084 compilation units......
This also means math/util.h is leaking to 1084 compilation units which seems a bit high too.
2021-06-01 18:44:22 -04:00
Marek Roszko
cbad18ad98
Hide gal profiling behind KICAD_GAL_PROFILE cmake option
...
__WXDEBUG__ is too easy to get set
2021-04-30 19:24:36 -04:00
Ian McInerney
ecd9bf696e
Be consistent about using nullptr instead of 0
...
0 can be too easily overloaded into an int, so ensure we use nullptr
when we mean pointers.
2021-04-22 22:20:34 +01:00
Jeff Young
b83380b2ba
Performance: don't look up map entry twice.
...
Fixes https://gitlab.com/kicad/code/kicad/issues/8157
2021-04-08 23:10:30 +01:00
Jonathan Haas
55679be2e3
Fix some typos across the codebase
2021-04-05 16:15:25 +02: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
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
Dominik Wernberger
e2aa7be4b3
Added a lot of consts and refactored a few lines
2021-03-08 12:49:48 -08:00
Wayne Stambaugh
509b1b7141
Fix for Coverity issue 157131.
...
Don't allow exception to be thrown from OPENGL_COMPOSITOR dtor.
2021-02-23 19:09:41 -05: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
Marek Roszko
907e282347
Silence some msvc warnings
...
- exception variables that were unused
- RAYSEG2D improperly foward declared with class instead of struct
- unused vars
2021-02-20 11:58:55 -05:00
Wayne Stambaugh
b959378d58
Attempt to fix Coverity issue 168705.
2021-02-16 17:29:12 -05:00
Wayne Stambaugh
e7227a4f21
GAL code cleaning.
2021-02-16 17:25:27 -05:00
Jeff Young
60d4d5b846
Scale down netnames on tracks so overbars fit.
...
Also fixes a bug where the overbar ignored the color opacity.
Fixes https://gitlab.com/kicad/code/kicad/issues/7524
2021-02-14 12:15:26 +00:00
Jeff Young
f6aa25df52
Make bitmap text measuring cognizant of overbars.
...
Also adds fallback for when text contains super- or subscript.
Fixes https://gitlab.com/kicad/code/kicad/issues/6846
2021-02-07 13:59:53 +00:00
Seth Hillbrand
945faba586
Wrap CTOR in try/catch for context errors
2021-01-28 10:55:27 -08: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