Maciej Suminski
80956ef1e6
Added GAL::DrawPolygon(SHAPE_POLY_SET) & GAL::DrawPolyLine(SHAPE_LINE_CHAIN)
2017-01-27 19:08:32 +01:00
Maciej Suminski
88eb648cbb
Alternative way of handling OpenGL initialization & errors
...
Some faults could result in a crash, as they were not properly
handled. Now the rendering loop is wrapped with try..catch block
which will revert to Cairo in case of an error and display an
error message.
Fixes: lp:1655766
* https://bugs.launchpad.net/kicad/+bug/1655766
2017-01-13 16:50:36 +01:00
Maciej Suminski
e0577c0218
checkGlError() may throw exceptions or display an error message
2017-01-13 16:46:02 +01:00
Maciej Suminski
5a7604cbb4
More code formatting
2017-01-13 10:36:59 +01:00
Maciej Suminski
67b0a8c990
Fixed type casting in SHADER class
2017-01-11 17:37:10 +01:00
Maciej Suminski
da00d64877
OpenGL antialising code clean up & formatting
2017-01-11 16:20:37 +01:00
decimad
77138e3702
Add UI control to set up gal opengl antialiasing and load/store the settings
2017-01-11 16:20:37 +01:00
decimad
2a8dd508c4
Add smaa (subsample morphological antialiasing)
2017-01-11 16:20:37 +01:00
decimad
02bb410cdb
Refactor COMPOSITOR/OPENGL_COMPOSITOR to enable customization of scene rendering and presentation
2017-01-11 16:20:35 +01:00
decimad
77f9cd0cb0
remove custom shader header generation build-step in favor of c++11 raw string literals
...
rework shader loading code to handle an arbitrary amount of to-be-concatenated strings
2017-01-11 16:20:34 +01:00
decimad
047f52e7cb
Move builtin font resources out of opengl_gal translation unit
2017-01-11 16:20:33 +01:00
jean-pierre charras
30df041de6
fix shadowed local variables
2016-11-25 18:17:34 +01:00
decimad
402f53a302
update font code along with the changes done in the msdf atlas tool (use codepoint spans and refined char placement)
...
add font coordinate system clarification drawing (svg)
2016-10-20 14:31:09 +02:00
Simon Richter
59c81976dc
Explicitly mark overriding functions.
2016-09-24 14:53:15 -04:00
Simon Richter
da5699de0a
Replace boost::shared_ptr with std::shared_ptr.
2016-06-29 11:09:55 -04:00
Maciej Suminski
b7ec4ea160
Corrected the last instance check in OPENGL_GAL.
2016-06-10 17:07:12 +02:00
Simon Richter
5ce4abd0ac
Use size_t for sizes and offsets.
2016-06-10 17:06:00 +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
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
jean-pierre charras
3e2cae946c
Corrected wxDC objects used by EDA_DRAW_PANEL_GAL & OPENGL_GAL.
2016-06-03 15:46:11 +02:00
Maciej Suminski
3ca7026aa0
More robust checks for OpenGL canvas visibility.
2016-05-20 12:06: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
fff3abc9a0
Support for overbars in bitmap fonts (OpenGL GAL).
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
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
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
bda3011519
Initial support for bitmap fonts (OpenGL GAL).
2016-05-02 16:04:45 +02:00
Maciej Suminski
c0465e5519
Instance counter for OPENGL_GAL to avoid double freeing.
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
113e75c5c5
VERTEX_MANAGER functions return false in case of failure.
2016-05-02 15:56:11 +02:00
Maciej Suminski
0cfa360390
Added VERTEX_MANAGER::Reserve() function.
2016-05-02 15:56:10 +02: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
231eaecf34
Removed the included GLM library, switched to the system one.
2015-12-08 10:56:53 +01: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
Simon Richter
27a2098e0a
Add <cstddef> include for offsetof
2015-07-30 14:29:50 +02:00
Maciej Suminski
709697ea40
Better way to determine supported OpenGL version and extensions.
2015-04-20 14:16:41 +02:00
Alexander Golubev
f2ce42ddb5
fix several -Woverloaded-virtual warnings in common/* dir
...
- CACHED_CONTAINER::GetVertices: removed useless and unused function
which does nothing but tainted the API
- SHAPE_LINE_CHAIN::Collide( const BOX2I& aBox, int aClearance ):
removed an outdated function with assert(false)
- SHAPE::BBox(): fix a small typo in the doc string
2015-03-06 15:26:47 +01:00
Maciej Suminski
4fb9bce354
Code formatting.
2015-02-18 17:53:46 +01:00
Tomasz Włostowski
83ffb8969f
gal: minor comment fix
2015-02-18 00:45:29 +01:00
Maciej Suminski
b1ace1607b
Reworked GAL switching.
...
Now OpenGL can report its problems instead of shutting down the application.
2015-02-15 02:18:35 +01:00
jean-pierre charras
24f516f6ae
Fix many doxygen warnings (due to missing info, old comments, typo ...) when building the doxygen doc.
2014-11-02 17:25:04 +01:00