Maciej Suminski
ad2df70953
Added EDA_DRAW_PANEL_GAL::ForceRefresh().
11 years ago
Maciej Suminski
91e9df59d4
Fixed layers order after changing the active layer.
12 years ago
Maciej Suminski
2f7706e8cd
Reduced number of switched events, allowing to use VIEW_CONTROLS, even if there is no extra event dispatcher.
12 years ago
Maciej Suminski
60b0a4e0be
Alternative approach to handling events and commands by TOOL_DISPATCHER.
Event handlers are (dis)connected depending on the active view.
TOOL_DISPATCHER inherits from wxEvtHandler, so now it receives events directly instead of being fed by external handlers.
12 years ago
Maciej Suminski
a68165d2a0
Minor changes (removed an unnecessary event handler and two function calls that had no real influence).
12 years ago
Maciej Suminski
9a47f4c645
Created a specialization of EDA_DRAW_PANEL_GAL: PCB_DRAW_PANEL_GAL.
Moved View related routines & fields from PCB_{BASE,EDIT}_FRAME & BOARD to PCB_DRAW_PANEL_GAL.
12 years ago
Maciej Suminski
2f6c5f3156
Removed EDA_DRAW_FRAME::SetGalCanvasActive() [it may be misleading], added EDA_DRAW_PANEL_GAL::GetBackend().
12 years ago
Maciej Suminski
d27ea7895d
Moved background color settings from GAL to RENDER_SETTINGS. Added RENDER_SETTINGS::TranslateColor() to convert between EDA_COLOR_T and COLOR4D.
12 years ago
Maciej Suminski
761375ddef
More compatibility fixes.
12 years ago
Maciej Suminski
3f8d9da31f
Key events are handled by wxEVT_CHAR instead of wxEVT_KEY_[UP|DOWN]. Fixed issue of chars that require modifiers (e.g. ? is Shift+/ on US keyboard layout).
12 years ago
Maciej Suminski
024bf9dd84
Fixed GAL canvas freeze when ordered twice to change to the same GAL canvas (e.g. double F11).
12 years ago
Maciej Suminski
ba275918e3
Renamed [class_]drawpanel_gal.[cpp|h] to [class_]draw_panel_gal.[cpp|h] to follow current naming scheme.
12 years ago
Maciej Suminski
c5a3c1082a
Removed a few RecacheAllItems() calls, some of them changed to specific type recaching (using TYPE_COLLECTOR & VIEW_ITEM::ViewUpdate() ).
Removed OPENGL_GAL::SetStrokeColor().
12 years ago
Maciej Suminski
5ac699776d
Revisiting GAL:
- VIEW_ITEM::ViewUpdate() does not update items immediately. Now it marks them to be updated and the real update occurs on the next rendering frame.
- VIEW::InvalidateItem() made private.
- VIEW_LAYER::enabled -> visible
- Some functions moved to header files.
12 years ago
Maciej Suminski
597e98dbf4
Cursor is in world coordinates.
12 years ago
Maciej Suminski
0e7db24049
Fixed SetCurrentContext() assert, that was firing on closure of pcbnew, when the OpenGL backend was active.
12 years ago
Maciej Suminski
c21ae6efca
Double click support for the Tool Framework.
12 years ago
Maciej Suminski
5235d7e5eb
Modified error handling for OpenGL backend, now error messages should be visible.
12 years ago
Maciej Suminski
0ac3e1fbf2
Namespace KiGfx->KIGFX.
template<> -> template <>
Some more reformatting according to uncrustify results.
12 years ago
Maciej Suminski
22045b61ea
Converted tabs to spaces. Removed trailing whitespaces.
12 years ago
Maciej Suminski
3f320e4d68
Some more comments and code formatting.
12 years ago
Maciej Suminski
d1578e4e1a
Fixed cvpcb build.
12 years ago
Maciej Suminski
1624320749
Added protection from redrawing while GAL backend is being switched.
12 years ago
Maciej Suminski
42860b5d02
Changed VIEW::PrepareTargets() to more appropriate name VIEW::ClearTargets(). Added SELECTION layer to always-on-top list.
12 years ago
Maciej Suminski
f9cc914960
Mouse movement events are sent during autopanning, as the cursor position changes in the world coordinates (even if it stays still in the screen coordinates). It allows tools to update their state, as if the mouse was moved.
12 years ago
tomasz.wlostowski@cern.ch
f85bf48a4b
EDA_DRAW_PANEL_GAL: redraw stuff in a single place, with "coalescing"
Redraws can be requested way too often than it is required. This commit adds redraw timeout:
- if the view became dirty and there has been no redraw for longer than certain time, it is redrawed immediately
- otherwise, we wait for the next frame
This in general improves smoothness of rendering.
12 years ago
tomasz.wlostowski@cern.ch
b0694e0333
EDA_DRAWPANEL_GAL: set focus on mouse enter to catch all key events
12 years ago
Maciej Suminski
f1b0ffd3d7
Changed focus owner of LayerWidget to EDA_DRAW_PANEL_GAL to make keyboard events work (apparently everything works fine, to be tested more extensively).
Removed unnecessary event hook from EDA_DRAW_PANEL_GAL.
12 years ago
Maciej Suminski
fef50dd81e
Changed way of naming VIEW_ITEM update flags to be more explicit.
VIEW_ITEMs save the layer numbers they use, it allowed to speed up removal of items.
12 years ago
Maciej Suminski
edea2f9112
Reduced displayed events information.
12 years ago
Maciej Suminski
6fe086ab6d
Added cursor snapping.
12 years ago
Maciej Suminski
215f35e237
Added mouse cursor drawing.
Added flipping mode.
12 years ago
Maciej Suminski
3962464190
Fixed linking errors for apps other than pcbnew.
12 years ago
Maciej Suminski
89a138c09e
Added handling keyboard events for the Tool framework.
13 years ago
Maciej Suminski
5adba827a6
Added VIEW_GROUP for grouping items to be displayed on a single layer.
13 years ago
Maciej Suminski
43ae1cb98d
Smarter way of the overlay rendering (overlay is always refreshed, while cached&noncached targets only if the viewport or items have changed).
13 years ago
Maciej Suminski
723424df07
Added some comments.
13 years ago
Maciej Suminski
8ab98ae60b
Removed frame limiter.
13 years ago
tomasz.
69a44d5f13
pcbnew: hooked Tool Framework into the edit panel. Added a sample selection tool (not fully functional).
13 years ago
Maciej Suminski
f9d74ccb70
Removed shaderless OpenGL backend.
13 years ago
Maciej Suminski
5242fff9d7
Code refactorization. VBO_CONTAINER is split to [NON]CACHED_MANAGER, GPU_MANAGER and VERTEX_MANAGER.
13 years ago
Maciej Suminski
9c4e02379a
Added the 'cached' parameter for VIEW_LAYER. The parameter decides if items drawn on the layer should be cached or drawn in immediate mode.
Removed m_useGroups from VIEW, as now groups are enabled per layer.
13 years ago
Maciej Suminski
073eb024fe
Reduced frame limit.
13 years ago
Maciej Sumiński
27a6f8afd6
Shaders are built-in instead of being loaded from external files.
13 years ago
Maciej Suminski
ef865aab68
Grid settings apply to GAL based rendering.
13 years ago
Maciej Suminski
fd6ab6003d
Bug fixes:
- VBO_CONTAINER::allocate() was returning wrong value in case of error
- framelimiter had wrong formula for computing destined period between frames
- removed _padding field from VBO_VERTEX, as it was not speeding up, but wasting memory
13 years ago
Maciej Suminski
929a849b99
Added a framerate limiter.
Now it does not use all the CPU power while panning even on simple boards.
13 years ago
Maciej Suminski
876bf75d89
Added GAL_TYPE_NONE as an indicator of GAL uninitialized state.
13 years ago
Maciej Suminski
04b4f236be
Switching to OpenGL using shaders backend on the fly (changed keyboard shortcuts: different backends are available using Alt+F9..F12).
13 years ago
Maciej Suminski
28511cf4fe
Introducing shaders.
Shader's parameters are stored in VBO_ITEM. Changed VBO_ITEM data structure. Added UseShader() function for selecting shader for a given VBO_ITEM.
Added one main vertex & fragment shader program to be used for with all kinds of items (type of shader is selected using attributes that are stored in VBO). Currently available shaders are: at-least-1px-width line, filled circle and stroked circle.
Removed unnecessary param (aDepthOffset) from a few functions (OPENGL_GAL::drawSemiCircle(), OPENGL_GAL::drawLineCap()). Removed function OPENGL_GAL::DrawRoundedSegment(). Changed some asserts to debug info or error log.
13 years ago