Simon Richter
da5699de0a
Replace boost::shared_ptr with std::shared_ptr.
2016-06-29 11:09:55 -04:00
Michael Steinberg
fde12ebd25
Replace boost::function and boost::bind with their std:: counterparts
2016-06-29 12:23:11 +02:00
Maciej Suminski
b82ccc3b4e
Reverted 6912 with minor changes (LockCtx requires to specify canvas that locks a context).
2016-06-13 16:43:33 +02:00
Maciej Suminski
57d4e8d51d
Fixed OpenGL crash on canvas switch.
2016-06-13 09:35:36 +02:00
Maciej Suminski
b7ec4ea160
Corrected the last instance check in OPENGL_GAL.
2016-06-10 17:07:12 +02:00
Simon Richter
eb45f02138
Avoid pointer truncation in debug message
2016-06-10 11:06:47 +02:00
Simon Richter
2928cb7419
Replace unshared boost::shared_array with std::unique_ptr
2016-06-08 09:43:07 +02:00
Maciej Suminski
3fcae6b120
Fixes for OpenGL resources handling.
2016-06-07 14:42:42 +02:00
Maciej Suminski
b4ad18a3ea
Do not rebuild shaders on each OPENGL_GAL construction.
2016-06-03 15:46:13 +02:00
Maciej Suminski
b83c148e10
Delete OpenGL context on GLCanvas subclasses destruction.
2016-06-03 15:46:13 +02:00
Maciej Suminski
68b6da57c0
Removed OPENGL_GAL::instanceCounter.
2016-06-03 15:46:12 +02:00
Maciej Suminski
01f32dd52c
GL_CONTEXT_MANAGER class to avoid unexpected GL context switches.
2016-06-03 15:46:12 +02:00
Maciej Suminski
4f7bb4c0f7
Simplified error checking in OPENGL_GAL test.
2016-06-03 15:46:11 +02:00
jean-pierre charras
3e2cae946c
Corrected wxDC objects used by EDA_DRAW_PANEL_GAL & OPENGL_GAL.
2016-06-03 15:46:11 +02:00
José Ignacio Romero
5832e37177
GAL: Fix offset problem in multiline text rendering
...
Commit BZR 6703 introduced a minor horizontal adjustment for stroke
text rendering in GAL, but the Translate() call was done before
calling Save(). So, when this function was called multiple times a
residual offset carried over to each subsequent line.
bzr 6703 = git 67982a4
2016-05-29 17:40:11 -04:00
jean-pierre charras
1ae9175671
A few minor fixes for compil warnings (shadowed variables and deprecated auto_ptr)
2016-05-29 17:02:34 +02:00
jean-pierre charras
ca0113ab65
Fix my previous commit: I committed the wrong file
2016-05-28 21:51:35 +02:00
jean-pierre charras
b7f863dc4c
Fix the commit 6838 (Fix non optimal position of net name and pad name in GAL mode), broken.
2016-05-28 21:46:13 +02:00
Simon Richter
96ec9db5d6
Add missing C++ stdlib headers
...
The GCC standard library headers often include other headers, which makes
some code compile that forgets to include several headers.
2016-05-28 12:46:29 -04:00
Maciej Suminski
ade1d1fe74
Fixed display of 'b' letter in OpenGL canvas.
2016-05-27 14:44:44 +02:00
Maciej Suminski
2ded7bf82a
Improved error handling for SHADER class.
2016-05-23 09:54:53 +02:00
Maciej Suminski
a42cb0ef8c
OpenGL GAL: Set context in destructor when possible (under Linux the window has to be visible).
2016-05-09 18:00:34 +02:00
Maciej Suminski
d9f4877c94
Fixed a crash when starting pcbnew with OpenGL GAL.
2016-05-09 17:23:01 +02:00
Maciej Suminski
cca36d355a
Remove unnecessary debug messages (OpenGL GAL).
2016-05-04 10:10:15 +02:00
Maciej Suminski
22c4e4d240
Set OpenGL context only when the parent window is visible.
2016-05-03 16:39:58 +02:00
Maciej Suminski
55976e39ef
Fixed crash occuring when a vertex buffer is mapped in invalid OpenGL context.
2016-05-03 16:16:59 +02:00
Maciej Suminski
a62d2b5412
Bigger net labels (GAL).
2016-05-03 15:15:08 +02:00
Maciej Suminski
8d952f35c6
Fixed text vertical alignment for bitmap font (OpenGL).
2016-05-03 11:58:48 +02:00
Maciej Suminski
58ed0c8cce
Improved grid drawing routine (OpenGL).
2016-05-02 16:15:24 +02:00
Maciej Suminski
2f09e0ee40
Alternative version of CACHED_CONTAINER::defragmentResize() Certain GPUs do not support glCopyBufferSubData(), therefore there is an alternative version working with good, old memcpy().
2016-05-02 16:15:24 +02:00
Maciej Suminski
d23a508aa3
Fixed errors introduced to STROKE_FONT class.
2016-05-02 16:15:23 +02:00
Maciej Suminski
3e3ecccb2b
A few more fixes related to the previous commit.
2016-05-02 16:15:23 +02:00
Maciej Suminski
6e881f51fd
Changed bound buffers to improve compatibility (OpenGL GAL).
2016-05-02 16:15:23 +02:00
Maciej Suminski
0c4b6dabd3
Increased interglyph spacing to avoid artifacts when mipmapping is enabled.
2016-05-02 16:14:26 +02:00
Maciej Suminski
fff3abc9a0
Support for overbars in bitmap fonts (OpenGL GAL).
2016-05-02 16:12:18 +02:00
Maciej Suminski
c506d2b16c
Set OpenGL context before freeing video resources.
2016-05-02 16:12:18 +02:00
Maciej Suminski
59fe8df269
Split bitmap text drawing routine into smaller functions (GAL).
2016-05-02 16:12:18 +02:00
Maciej Suminski
a3a9641ae2
Disable invalidating buffer on CACHED_CONTAINER::Clear(). OpenGL context is not available when the method is called, so it does not work.
2016-05-02 16:12:18 +02:00
Maciej Suminski
5a8adcdf52
Improved testing/profiling code for CACHED_CONTAINER. Switched from wxLogDebug to wxLogTrace. Adjusted CACHED_CONTAINER_TEST levels required for certain tests. Added a test to check used space in the container.
2016-05-02 16:12:17 +02:00
Maciej Suminski
54f3105cfb
More changes to CACHED_CONTAINER. Removed m_itemSize field (error-prone, as it had to be synchronized with m_item->GetSize()) Fixed a bug in reallocate() method, changed a bit it is behaviour. VERTEX_ITEM is not stored in the item set if its size is 0.
2016-05-02 16:12:17 +02:00
Maciej Suminski
deb578eadd
Recognize a special case of completely filled/defragmented container when resizing.
2016-05-02 16:12:17 +02:00
Maciej Suminski
a9c3a1730b
Free chunks in CACHED_CONTAINER only if they are really not needed.
2016-05-02 16:12:16 +02:00
Maciej Suminski
702be4903f
Vertices are stored in GPU memory (OpenGL GAL).
2016-05-02 16:12:16 +02:00
Maciej Suminski
01912aaabd
Minor refactoring in CACHED_CONTAINER.
2016-05-02 16:12:16 +02:00
Maciej Suminski
b32fdd97d9
Changed shading model to flat.
2016-05-02 16:12:15 +02:00
Maciej Suminski
52c698ab11
Fixed an included header (OpenGL GAL).
2016-05-02 16:12:14 +02:00
Maciej Suminski
e2c8e07344
Enabled mipmapping for bitmap fonts.
2016-05-02 16:12:14 +02:00
Maciej Suminski
53ef29802f
Switched bitmap font to higher resolution.
2016-05-02 16:11:39 +02:00
Maciej Suminski
05a30b7591
Do not draw anything if vertex containers are empty.
2016-05-02 16:08:50 +02:00
Maciej Suminski
928d4e0404
SwapBuffers() contain an implicit glFlush()
2016-05-02 16:08:50 +02:00
Maciej Suminski
bda3011519
Initial support for bitmap fonts (OpenGL GAL).
2016-05-02 16:04:45 +02:00
Maciej Suminski
431e343201
Switch to direct rendering before clearing the screen (OpenGL GAL).
2016-05-02 15:56:19 +02:00
Maciej Suminski
5ba84dda0a
OpenGL capabilities test is run only once.
2016-05-02 15:56:19 +02:00
Maciej Suminski
795fd28742
Set Stroke/Fill settings for stroke font in its Draw() function.
2016-05-02 15:56:17 +02:00
Maciej Suminski
36dd6eb6b3
GAL profiling output is enabled with WXTRACE env variable.
2016-05-02 15:56:17 +02:00
Maciej Suminski
c0465e5519
Instance counter for OPENGL_GAL to avoid double freeing.
2016-05-02 15:56:16 +02:00
Maciej Suminski
dbff9ad786
Improved error checking in GPU_MANAGER.
2016-05-02 15:56:16 +02:00
Maciej Suminski
4cca3bc368
Minor OPENGL_COMPOSITOR refactoring.
2016-05-02 15:56:16 +02:00
Maciej Suminski
1927f3a787
Unified way of checking OpenGL errors.
2016-05-02 15:56:14 +02:00
Maciej Suminski
2a276550eb
Fixed SHADER::AddParameter() function.
2016-05-02 15:56:13 +02:00
Maciej Suminski
b143ce6b0f
Moved text settings from STROKE_FONT to GAL.
2016-05-02 15:56:12 +02:00
Maciej Suminski
da312db7a4
Fixed a wxWidgets assertion. Newer wxWidgets (3.1) display a message saying that horizontal alignment flags are ignored with wxEXPAND.
2016-05-02 15:56:12 +02:00
Maciej Suminski
113e75c5c5
VERTEX_MANAGER functions return false in case of failure.
2016-05-02 15:56:11 +02:00
Maciej Suminski
4262915b38
Code formatting.
2016-05-02 15:56:10 +02:00
Maciej Suminski
0cfa360390
Added VERTEX_MANAGER::Reserve() function.
2016-05-02 15:56:10 +02:00
jean-pierre charras
67982a4851
stroke font: fine adjust of text horizontal position. edat_text: fix an issue in SetOrientation: the rotation angle is now constrained between -360 and +360 degrees.
...
It was previously not the case, and rotated texts outside this interval created issues in dialog_pcb_text_properties which have now validators.
2016-04-19 20:35:47 +02:00
Maciej Suminski
99e7e8c983
Disabled CACHED_CONTAINER freeing memory on GAL<->legacy switch.
2016-04-04 13:54:55 +02:00
jean-pierre charras
18cb83f5c7
OpenGL mode: Disable frequent (and not very usefull) memory deallocation/reallocation to avoid "out of memory" issue due to heap fragmentation (noticeable only with large boards).
...
Note: there is still this issue when switching back legacy mode and to Opengl mode because the heap is still freed and reallocated.
2016-04-04 12:41:48 +02:00
jean-pierre charras
426f7ebb2e
Rework on class EDA_TEXT and related classes and draw text functions. More work: remove useless or duplicate code (from legacy graphic text plot functions). Move basic_gal code to separate files.
2016-03-25 09:33:45 +01:00
jean-pierre charras
92ce9c1193
Rework on class EDA_TEXT and related classes and draw text functions. More work: remove useless or duplicate code (from legacy graphic text plot functions). Move basic_gal code to separate files.
2016-03-25 09:26:11 +01:00
jean-pierre charras
bc699c8d8f
Rework on class EDA_TEXT and related classes and draw functions. More work. Eechema: in rotate texts: redraw the full screen to avoid garbage on screen.
2016-03-23 13:16:27 +01:00
jean-pierre charras
30d72045e7
Rework on class EDA_TEXT and related classes and draw functions (Note: this is a work in progress):
...
* remove duplicate code between draw functions and STROKE_FONT used in GAL. Use only STROKE_FONT methods in draw, plot and test DRC function for texts. It remove slightly different shapes between GAL and other calculations.
* fix incorrect bounding box for texts with overbar. Especially noticeable for texts with overbar inside a copper zone in Pcbnew.
* fix a few minor other bugs related to graphic texts.
2016-03-23 08:41:47 +01:00
jean-pierre charras
99e81aeb9c
Fix incorrect (too small) bounding box EDA_TEXT, noticeable when chars like j or { are used in zone fill functions.
...
I tried to merge some constants used both in legacy mode and gal mode (which were, before this patch, separate constants).
There is still a serious work to avoid different calculation code for the same text in draw and plot functions.
Work in progress to merge these calculation functions.
2016-03-11 13:08:34 +01:00
Bernhard Stegmaier
3e2b4244f9
OSX: add support for wxMagnifyEvent on OSX builds using wxWidgets 3.1.0 or greater.
2016-01-24 19:18:29 -05:00
Maciej Suminski
4951285a67
GAL::DrawPolygon() and GAL::DrawPolyline() variants that work with VECTOR2D array.
2016-01-20 15:16:39 +01:00
Maciej Suminski
9b4d12653e
FIxed the drawing layer for arcs (GAL).
2015-12-03 15:05:53 +01:00
unknown
c1b46e6ed8
Fix bug Bug #1519590 (gal cannot start on surface book)
2015-11-29 07:50:25 +01:00
jean-pierre charras
ecad3ad235
Netlist generator: avoid changing the order of parts in libparts section each time libraries are reloaded.
...
pic_programmer demo: very minor fix and update netlist.
cached_container.cpp: more info when the message "Out of memory" is displayed.
2015-11-05 17:28:31 +01:00
jean-pierre charras
a23cbe052d
Opengl canvas: avoid hanging when the CACHED_CONTAINER is "out of memory" (which can happen which very large boards) and the vertex manager cannot allocate an other vertex: the message "Vertex allocation error" is now shown only once.
...
the opengl canvas cannot show the full board, but at least the user can save the board, or switch to the legacy canvas.
2015-11-04 13:27:42 +01:00
Maciej Suminski
247f018075
FIxed rendering artifacts in OpenGL canvas.
2015-09-09 10:49:25 +02:00
Maciej Suminski
0386a4df94
Bulletproof canvas switching.
2015-08-21 10:33:36 +02:00
Maciej Suminski
4739c54f0e
Few minor updates to CACHED_CONTAINER & GPU_MANAGER classes. - Reduced the number of memory reallocations - Updated code for tests
2015-08-03 21:12:00 +02:00
unknown
40ccc0bedf
replace round() with KiROUND(), our function that is used almost everywhere for rounding, and detects int overflows in debug mode.
2015-07-17 10:26:48 +02:00
jean-pierre charras
1c9115ee91
opengl_gal: fix a strange but already encountered issue on Ubuntu/Unity when switching to GAL: the dialog which test the opengl version was never raised, and the Pcb editor frame partially no more responding to menu events.
...
Also fix a bug: this test dialog was never destroyed.
2015-07-13 10:46:05 +02:00
Maciej Suminski
51c0ae3480
Fixed cursor offset in GAL.
2015-07-01 03:46:42 +02:00
Maciej Suminski
785638a396
more fix for Cairo setting screen size.
2015-06-30 15:06:30 +02:00
Maciej Suminski
d3c7b45438
Corrected GAL canvases screen size, so they do not include scroll bars.
2015-06-30 14:08:35 +02:00
Maciej Suminski
28a270a328
Refactored grid origin point drawing (GAL).
2015-06-18 17:51:53 +02:00
Garth Corral
6eaf029a0e
Pinch to zoom for OS X.
2015-05-21 22:54:29 +02:00
Maciej Suminski
48a74dba37
Added missing 'def'
2015-05-21 00:47:53 +02:00
Maciej Suminski
420c1d1bcd
Changed the patch to support full resolution on Retina screens to be more bulletproof.
2015-05-21 00:42:46 +02:00
Maciej Suminski
6fc59f9acd
Full resolution in OpenGL canvas on Retina displays
2015-05-18 13:48:12 +02:00
Maciej Suminski
709697ea40
Better way to determine supported OpenGL version and extensions.
2015-04-20 14:16:41 +02:00
Maciej Suminski
7480bcf1ae
Yet another desperate trial to fix the depth buffer issues.
2015-04-17 12:15:25 +02:00
Maciej Suminski
4dae107dab
Alternative depth range in OpenGL GAL.
2015-03-30 22:14:37 +02:00
Maciej Suminski
9e8719d3ff
Fixed overlapping segment endings in OpenGL view.
2015-03-30 14:09:56 +02:00
jean-pierre charras
bb50e141f4
Pcbnew: Force visibility of items which have no option in dialogs to controle this visibility, when reading the .kicad_brd file.
...
these options are used in GAL mode, but the usercannot control this visibility. So if the board file does not have these visibility flags set, the GAL never show them.
Fix also a compil warning.
2015-03-26 14:20:11 +01:00
jean-pierre charras
6e8a8a6b25
Fix some coverity warnings (mainly not initialized members)
2015-03-21 10:06:04 +01:00
Chris Pavlina
1d2e2e555b
Final solution for the text overbar problem in GAL.
2015-03-16 18:18:18 +01:00
Chris Pavlina
e6db185f2e
Adjusted text overbar height in GAL.
2015-03-16 16:42:45 +01:00