KiCad PCB EDA Suite
Loading...
Searching...
No Matches
opengl_gal.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KICAD, a free EDA CAD application.
3 *
4 * Copyright (C) 2012 Torsten Hueter, torstenhtr <at> gmx.de
5 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
6 * Copyright (C) 2013-2017 CERN
7 * @author Maciej Suminski <[email protected]>
8 *
9 * Graphics Abstraction Layer (GAL) for OpenGL
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
15 *
16 * This program is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program. If not, see <https://www.gnu.org/licenses/>.
23 */
24
25#ifndef OPENGLGAL_H_
26#define OPENGLGAL_H_
27
28// GAL imports
29#include <gal/gal.h>
32#include <gal/opengl/shader.h>
39#include <gal/hidpi_gl_canvas.h>
40
41#include <set>
42#include <unordered_map>
43#include <memory>
44#include <wx/event.h>
45
46#ifndef CALLBACK
47#define CALLBACK
48#endif
49
50class GLUtesselator;
51class wxImage;
52
53struct bitmap_glyph;
54
55namespace KIGFX
56{
57class SHADER;
58class GL_BITMAP_CACHE;
59
60
68class GAL_API OPENGL_GAL : public GAL, public HIDPI_GL_CANVAS
69{
70public:
83 OPENGL_GAL( const KIGFX::VC_SETTINGS& aVcSettings, GAL_DISPLAY_OPTIONS& aDisplayOptions, wxWindow* aParent,
84 wxEvtHandler* aMouseListener = nullptr, wxEvtHandler* aPaintListener = nullptr,
85 const wxString& aName = wxT( "GLCanvas" ) );
86
88
95 static wxString CheckFeatures( GAL_DISPLAY_OPTIONS& aOptions );
96
97 bool IsOpenGlEngine() override { return true; }
98
99 bool UsesPolygonTriangulationCache() const override { return true; }
100
102 bool IsInitialized() const override
103 {
104 // is*Initialized flags, but it is enough for OpenGL to show up
105 return IsShownOnScreen() && !GetClientRect().IsEmpty();
106 }
107
108 bool IsVisible() const override
109 {
110 // VIEW skips cached item updates for invisible canvases, which a lost context cannot take
111 return GetContextLoss() == GAL_CONTEXT_LOSS::NONE && IsShownOnScreen() && !GetClientRect().IsEmpty();
112 }
113
114 void SetMinLineWidth( float aLineWidth ) override;
115
116 // ---------------
117 // Drawing methods
118 // ---------------
119
121 void DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) override;
122
124 void DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint,
125 double aWidth ) override;
126
128 void DrawSegmentChain( const std::vector<VECTOR2D>& aPointList, double aWidth ) override;
129 void DrawSegmentChain( const SHAPE_LINE_CHAIN& aLineChain, double aWidth ) override;
130
132 void DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) override;
133
135 void DrawHoleWall( const VECTOR2D& aCenterPoint, double aHoleRadius,
136 double aWallWidth ) override;
137
139 void DrawArc( const VECTOR2D& aCenterPoint, double aRadius, const EDA_ANGLE& aStartAngle,
140 const EDA_ANGLE& aAngle ) override;
141
143 void DrawArcSegment( const VECTOR2D& aCenterPoint, double aRadius, const EDA_ANGLE& aStartAngle,
144 const EDA_ANGLE& aAngle, double aWidth, double aMaxError ) override;
145
147 void DrawEllipse( const VECTOR2D& aCenterPoint, double aMajorRadius, double aMinorRadius,
148 const EDA_ANGLE& aRotation ) override;
149
151 void DrawEllipseArc( const VECTOR2D& aCenterPoint, double aMajorRadius, double aMinorRadius,
152 const EDA_ANGLE& aRotation, const EDA_ANGLE& aStartAngle,
153 const EDA_ANGLE& aEndAngle ) override;
154
156 void DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) override;
157
159 void DrawPolyline( const std::deque<VECTOR2D>& aPointList ) override;
160 void DrawPolyline( const std::vector<VECTOR2D>& aPointList ) override;
161 void DrawPolyline( const VECTOR2D aPointList[], int aListSize ) override;
162 void DrawPolyline( const SHAPE_LINE_CHAIN& aLineChain ) override;
163
165 void DrawPolylines( const std::vector<std::vector<VECTOR2D>>& aPointLists ) override;
166
168 void DrawPolygon( const std::deque<VECTOR2D>& aPointList ) override;
169 void DrawPolygon( const VECTOR2D aPointList[], int aListSize ) override;
170 void DrawPolygon( const SHAPE_POLY_SET& aPolySet, bool aStrokeTriangulation = false ) override;
171 void DrawPolygon( const SHAPE_LINE_CHAIN& aPolySet ) override;
172
174 virtual void DrawGlyph( const KIFONT::GLYPH& aGlyph, int aNth, int aTotal ) override;
175
177 virtual void DrawGlyphs( const std::vector<std::unique_ptr<KIFONT::GLYPH>>& aGlyphs ) override;
178
180 void DrawCurve( const VECTOR2D& startPoint, const VECTOR2D& controlPointA,
181 const VECTOR2D& controlPointB, const VECTOR2D& endPoint,
182 double aFilterValue = 0.0 ) override;
183
185 void DrawBitmap( const BITMAP_BASE& aBitmap, double alphaBlend = 1.0 ) override;
186
188 void BitmapText( const wxString& aText, const VECTOR2I& aPosition,
189 const EDA_ANGLE& aAngle ) override;
190
192 void DrawGrid() override;
193
194 // --------------
195 // Screen methods
196 // --------------
197
199 void ResizeScreen( int aWidth, int aHeight ) override;
200
202 bool Show( bool aShow ) override;
203
205 int GetSwapInterval() const override { return m_swapInterval; };
206
208 void Flush() override;
209
210 void ClearScreen() override;
211
212 // --------------
213 // Transformation
214 // --------------
215
217 void Transform( const MATRIX3x3D& aTransformation ) override;
218
220 void Rotate( double aAngle ) override;
221
223 void Translate( const VECTOR2D& aTranslation ) override;
224
226 void Scale( const VECTOR2D& aScale ) override;
227
229 void Save() override;
230
232 void Restore() override;
233
234 // --------------------------------------------
235 // Group methods
236 // ---------------------------------------------
237
239 int BeginGroup() override;
240
242 void EndGroup() override;
243
245 void DrawGroup( int aGroupNumber ) override;
246
248 void ChangeGroupColor( int aGroupNumber, const COLOR4D& aNewColor ) override;
249
251 void ChangeGroupDepth( int aGroupNumber, int aDepth ) override;
252
254 void DeleteGroup( int aGroupNumber ) override;
255
257 void ClearCache() override;
258
259 // --------------------------------------------------------
260 // Handling the world <-> screen transformation
261 // --------------------------------------------------------
262
264 void SetTarget( RENDER_TARGET aTarget ) override;
265
267 RENDER_TARGET GetTarget() const override;
268
270 void ClearTarget( RENDER_TARGET aTarget ) override;
271
273 virtual bool HasTarget( RENDER_TARGET aTarget ) override;
274
276 void SetNegativeDrawMode( bool aSetting ) override {}
277
279 void StartDiffLayer() override;
280 //
282 void EndDiffLayer() override;
283
284 void ComputeWorldScreenMatrix() override;
285
286 // -------
287 // Cursor
288 // -------
289
290 bool SetNativeCursorStyle( KICURSOR aCursor, bool aHiDPI ) override;
291
293 void DrawCursor( const VECTOR2D& aCursorPosition ) override;
294
301 void PostPaint( wxPaintEvent& aEvent );
302
303 void SetMouseListener( wxEvtHandler* aMouseListener )
304 {
305 m_mouseListener = aMouseListener;
306 }
307
308 void SetPaintListener( wxEvtHandler* aPaintListener )
309 {
310 m_paintListener = aPaintListener;
311 }
312
313 void EnableDepthTest( bool aEnabled = false ) override;
314
315 bool IsContextLocked() override
316 {
317 return m_isContextLocked;
318 }
319
320 bool IsContextValid() const override
321 {
322 return m_isContextValid;
323 }
324
325 GAL_CONTEXT_LOSS GetContextLoss() const override;
326
327 bool IsResetSettled() override;
328
329 void LockContext( int aClientCookie ) override;
330
331 void UnlockContext( int aClientCookie ) override;
332
334 void BeginDrawing() override;
335
337 void EndDrawing() override;
338
339 bool GetScreenshot( wxImage& aDstImage );
340
343 {
346
348 std::deque<std::shared_ptr<GLdouble>>& intersectPoints;
349 };
350
351private:
353 typedef GAL super;
354
355 static wxGLContext* m_glMainContext;
356 wxGLContext* m_glPrivContext;
358 static int m_instanceCounter;
359 static int m_contextGroupId;
362 static bool m_glLoaded;
363 static std::set<OPENGL_GAL*> m_instances;
364 static bool m_resetSettled;
365
367 static GL_RESET_BUDGET::CLOCK::time_point m_resetDetectedAt;
368
370 wxEvtHandler* m_mouseListener;
371 wxEvtHandler* m_paintListener;
372
373 static GLuint g_fontTexture;
374
375 // Vertex buffer objects related fields
376 typedef std::unordered_map< unsigned int, std::shared_ptr<VERTEX_ITEM> > GROUPS_MAP;
377
379 unsigned int m_groupCounter;
385
388
389 // Framebuffer & compositing
391 unsigned int m_mainBuffer;
392 unsigned int m_overlayBuffer;
393 unsigned int m_tempBuffer;
395
396 // Shader
399
400 // Internal flags
417
420
421 std::unique_ptr<GL_BITMAP_CACHE> m_bitmapCache;
422
423 // Polygon tesselation
424 GLUtesselator* m_tesselator;
425 std::deque<std::shared_ptr<GLdouble>> m_tessIntersects;
426
427 void beginUpdate() override;
428
429 void endUpdate() override;
430
432 bool updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions ) override;
433
442 void drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint,
443 bool aReserve = true );
444
450 void reserveLineQuads( const int aLineCount );
451
463 void drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle );
464
473 void drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle );
474
484 void drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle,
485 bool aReserve = true );
486
494 void drawCircle( const VECTOR2D& aCenterPoint, double aRadius, bool aReserve = true );
495
503 void drawPolyline( const std::function<VECTOR2D( int )>& aPointGetter, int aPointCount,
504 bool aReserve = true );
505
514 void drawSegmentChain( const std::function<VECTOR2D( int )>& aPointGetter, int aPointCount,
515 double aWidth, bool aReserve = true );
516
520 void drawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aWidth,
521 bool aReserve = true );
522
530 void drawPolygon( GLdouble* aPoints, int aPointCount );
531
539 void drawTriangulatedPolyset( const SHAPE_POLY_SET& aPoly, bool aStrokeTriangulation );
540
550 int drawBitmapChar( unsigned long aChar, bool aReserve = true );
551
563 void drawBitmapOverbar( double aLength, double aHeight, bool aReserve = true );
564
571 void drawGridSources();
572
580 std::pair<VECTOR2D, float> computeBitmapTextSize( const UTF8& aText ) const;
581
582 // Event handling
588 void onPaint( wxPaintEvent& aEvent );
589
595 void skipMouseEvent( wxMouseEvent& aEvent );
596
602 void skipGestureEvent( wxGestureEvent& aEvent );
603
609 void onSetNativeCursor( wxSetCursorEvent& aEvent );
610
614 void blitCursor();
615
621 unsigned int getNewGroupNumber();
622
623 double getWorldPixelSize() const;
624
626
633
639 void init();
640
642 bool detectContextReset();
643
645 void orphanContextGroup();
646};
647} // namespace KIGFX
648
649#endif // OPENGLGAL_H_
This class handle bitmap images in KiCad.
Definition bitmap_base.h:47
HIDPI_GL_CANVAS(const KIGFX::VC_SETTINGS &aSettings, wxWindow *aParent, const wxGLAttributes &aGLAttribs, wxWindowID aId=wxID_ANY, const wxPoint &aPos=wxDefaultPosition, const wxSize &aSize=wxDefaultSize, long aStyle=0, const wxString &aName=wxGLCanvasName, const wxPalette &aPalette=wxNullPalette)
A color representation with 4 components: red, green, blue, alpha.
Definition color4d.h:101
GAL(GAL_DISPLAY_OPTIONS &aOptions)
Limit how often the OpenGL canvases are rebuilt after GPU resets.
void drawPolygon(GLdouble *aPoints, int aPointCount)
Draw a filled polygon.
void skipMouseEvent(wxMouseEvent &aEvent)
Skip the mouse event to the parent.
void drawSegment(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint, double aWidth, bool aReserve=true)
Internal method for segment drawing.
unsigned int m_groupCounter
Counter used for generating keys for groups.
Definition opengl_gal.h:379
std::unordered_map< unsigned int, std::shared_ptr< VERTEX_ITEM > > GROUPS_MAP
Definition opengl_gal.h:376
VERTEX_MANAGER * m_overlayManager
Container for storing overlaid VERTEX_ITEMs.
Definition opengl_gal.h:384
bool m_isInitialized
Basic initialization flag, has to be done when the window is visible.
Definition opengl_gal.h:404
VERTEX_MANAGER * m_currentManager
Currently used VERTEX_MANAGER (for storing VERTEX_ITEMs).
Definition opengl_gal.h:380
void drawCircle(const VECTOR2D &aCenterPoint, double aRadius, bool aReserve=true)
Internal method for circle drawing.
std::deque< std::shared_ptr< GLdouble > > m_tessIntersects
Definition opengl_gal.h:425
void SetNegativeDrawMode(bool aSetting) override
Set negative draw mode in the renderer.
Definition opengl_gal.h:276
bool IsInitialized() const override
Return the initialization status for the canvas.
Definition opengl_gal.h:102
WX_CURSOR_TYPE m_currentwxCursor
wx cursor showing the current native cursor.
Definition opengl_gal.h:419
unsigned int m_mainBuffer
Main rendering target.
Definition opengl_gal.h:391
static std::set< OPENGL_GAL * > m_instances
Canvases to repaint after a reset.
Definition opengl_gal.h:363
std::unique_ptr< GL_BITMAP_CACHE > m_bitmapCache
Definition opengl_gal.h:421
std::pair< VECTOR2D, float > computeBitmapTextSize(const UTF8 &aText) const
Compute a size of text drawn using bitmap font with current text setting applied.
bool IsContextLocked() override
Checks the state of the context lock.
Definition opengl_gal.h:315
void blitCursor()
Blit cursor into the current screen.
static wxString CheckFeatures(GAL_DISPLAY_OPTIONS &aOptions)
Check OpenGL features.
void drawBitmapOverbar(double aLength, double aHeight, bool aReserve=true)
Draw an overbar over the currently drawn text.
bool m_isBitmapFontInitialized
Is the shader set to use bitmap fonts?
Definition opengl_gal.h:403
static GL_RESET_BUDGET m_resetBudget
Rate of resets tolerated before falling back.
Definition opengl_gal.h:361
void drawSegmentChain(const std::function< VECTOR2D(int)> &aPointGetter, int aPointCount, double aWidth, bool aReserve=true)
Generic way of drawing a chain of segments stored in different containers.
bool updatedGalDisplayOptions(const GAL_DISPLAY_OPTIONS &aOptions) override
Update handler for OpenGL settings.
unsigned int m_overlayBuffer
Auxiliary rendering target (for menus etc.)
Definition opengl_gal.h:392
OPENGL_COMPOSITOR * m_compositor
Handles multiple rendering targets.
Definition opengl_gal.h:390
VERTEX_MANAGER * m_cachedManager
Container for storing cached VERTEX_ITEMs.
Definition opengl_gal.h:382
void SetPaintListener(wxEvtHandler *aPaintListener)
Definition opengl_gal.h:308
static bool m_glLoaded
GL entry points are loaded, so resets can be queried.
Definition opengl_gal.h:362
void drawFilledSemiCircle(const VECTOR2D &aCenterPoint, double aRadius, double aAngle)
Draw a filled semicircle.
void onPaint(wxPaintEvent &aEvent)
This is the OnPaint event handler.
GLint ufm_minLinePixelWidth
Definition opengl_gal.h:414
int m_ownContextGroupId
Group this canvas' contexts were created in.
Definition opengl_gal.h:369
static GL_RESET_BUDGET::CLOCK::time_point m_resetDetectedAt
When the last reset was detected, to stop waiting on a driver that never reports completion.
Definition opengl_gal.h:367
void drawStrokedSemiCircle(const VECTOR2D &aCenterPoint, double aRadius, double aAngle, bool aReserve=true)
Draw a stroked semicircle.
unsigned int getNewGroupNumber()
Return a valid key that can be used as a new group number.
GLint ufm_antialiasingOffset
Definition opengl_gal.h:413
bool IsVisible() const override
Return true if the GAL canvas is visible on the screen.
Definition opengl_gal.h:108
wxEvtHandler * m_mouseListener
Definition opengl_gal.h:370
int m_swapInterval
Used to store swap interval information.
Definition opengl_gal.h:357
double getWorldPixelSize() const
GROUPS_MAP m_groups
Stores information about VBO objects (groups)
Definition opengl_gal.h:378
void endUpdate() override
Disable item update mode.
GLint ufm_fontTextureWidth
Definition opengl_gal.h:416
void drawTriangulatedPolyset(const SHAPE_POLY_SET &aPoly, bool aStrokeTriangulation)
Draw a set of polygons with a cached triangulation.
int GetSwapInterval() const override
Return the swap interval. -1 for adaptive, 0 for disabled/unknown.
Definition opengl_gal.h:205
GAL super
Super class definition.
Definition opengl_gal.h:353
bool IsContextValid() const override
Check whether the locked context is actually the current one.
Definition opengl_gal.h:320
void SetMouseListener(wxEvtHandler *aMouseListener)
Definition opengl_gal.h:303
VERTEX_MANAGER * m_nonCachedManager
Container for storing non-cached VERTEX_ITEMs.
Definition opengl_gal.h:383
int drawBitmapChar(unsigned long aChar, bool aReserve=true)
Draw a single character using bitmap font.
GLUtesselator * m_tesselator
Definition opengl_gal.h:424
wxEvtHandler * m_paintListener
Definition opengl_gal.h:371
static bool m_resetSettled
Driver finished the last reset.
Definition opengl_gal.h:364
bool m_isContextLocked
Used for assertion checking.
Definition opengl_gal.h:407
bool m_isFramebufferInitialized
Are the framebuffers initialized?
Definition opengl_gal.h:401
void orphanContextGroup()
Abandon the shared context group so the next canvas created starts a fresh one.
static GLuint g_fontTexture
Bitmap font texture handle (shared)
Definition opengl_gal.h:373
GAL_CONTEXT_LOSS GetContextLoss() const override
Check whether a GPU reset destroyed this canvas' rendering context.
void reserveLineQuads(const int aLineCount)
Reserve specified number of line quads.
OPENGL_GAL(const KIGFX::VC_SETTINGS &aVcSettings, GAL_DISPLAY_OPTIONS &aDisplayOptions, wxWindow *aParent, wxEvtHandler *aMouseListener=nullptr, wxEvtHandler *aPaintListener=nullptr, const wxString &aName=wxT("GLCanvas"))
void beginUpdate() override
Enable item update mode.
bool m_isGrouping
Was a group started?
Definition opengl_gal.h:406
GLint ufm_screenPixelSize
Definition opengl_gal.h:411
GLint ufm_pixelSizeMultiplier
Definition opengl_gal.h:412
VECTOR2D getScreenPixelSize() const
void drawGridSources()
Render m_gridSources priority-descending; each writes its coverage into the stencil so lower-priority...
static int m_contextGroupId
Changes each time a reset kills the shared group.
Definition opengl_gal.h:359
void drawPolyline(const std::function< VECTOR2D(int)> &aPointGetter, int aPointCount, bool aReserve=true)
Generic way of drawing a polyline stored in different containers.
void skipGestureEvent(wxGestureEvent &aEvent)
Skip the gesture event to the parent.
void drawSemiCircle(const VECTOR2D &aCenterPoint, double aRadius, double aAngle)
Draw a semicircle.
void drawLineQuad(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint, bool aReserve=true)
Draw a quad for the line.
VERTEX_MANAGER * m_tempManager
Container for storing temp (diff mode) VERTEX_ITEMs.
Definition opengl_gal.h:387
void onSetNativeCursor(wxSetCursorEvent &aEvent)
Give the correct cursor image when the native widget asks for it.
SHADER * m_shader
There is only one shader used for different objects.
Definition opengl_gal.h:398
bool m_isContextValid
Did the last lock make us current?
Definition opengl_gal.h:408
bool UsesPolygonTriangulationCache() const override
Return true if filled polygons are drawn from the SHAPE_POLY_SET triangulation cache,...
Definition opengl_gal.h:99
RENDER_TARGET m_currentTarget
Current rendering target.
Definition opengl_gal.h:394
wxGLContext * m_glPrivContext
Canvas-specific OpenGL context.
Definition opengl_gal.h:356
static bool m_isBitmapFontLoaded
Is the bitmap font texture loaded?
Definition opengl_gal.h:402
static bool m_resetBudgetExhausted
Resets came too often to keep using OpenGL.
Definition opengl_gal.h:360
static wxGLContext * m_glMainContext
Parent OpenGL context.
Definition opengl_gal.h:355
void setupShaderParameters()
Set up the shader parameters for OpenGL rendering.
unsigned int m_tempBuffer
Temporary rendering target (for diffing etc.)
Definition opengl_gal.h:393
void init()
Basic OpenGL initialization and feature checks.
static int m_instanceCounter
GL GAL instance counter.
Definition opengl_gal.h:358
bool IsOpenGlEngine() override
Return true if the GAL engine is a OpenGL based type.
Definition opengl_gal.h:97
Provide the access to the OpenGL shaders.
Definition shader.h:73
Class to control vertex container and GPU with possibility of emulating old-style OpenGL 1....
Represent a polyline containing arcs as well as line segments: A chain of connected line and/or arc s...
Represent a set of closed polygons.
An 8 bit string that is assuredly encoded in UTF8, and supplies special conversion support to and fro...
Definition utf8.h:67
KICURSOR
Definition cursors.h:41
wxCursor WX_CURSOR_TYPE
Represents either a wxCursorBundle for wx 3.3+ or a wxCursor for older versions.
Definition cursors.h:36
#define GAL_API
Definition gal.h:27
MATRIX3x3< double > MATRIX3x3D
Definition matrix3x3.h:469
The Cairo implementation of the graphics abstraction layer.
Definition eda_group.h:30
GAL_CONTEXT_LOSS
State of a canvas' rendering context after a GPU reset.
RENDER_TARGET
RENDER_TARGET: Possible rendering targets.
Definition definitions.h:32
Class to store instances of VERTEX without caching.
Handle multitarget rendering (ie.
void DrawSegment(const ROUND_SEGMENT_2D &aSegment, unsigned int aNrSidesPerCircle)
Draw a thick line segment with rounded ends.
Parameters passed to the GLU tesselator.
Definition opengl_gal.h:343
VERTEX_MANAGER * vboManager
Manager used for storing new vertices.
Definition opengl_gal.h:345
std::deque< std::shared_ptr< GLdouble > > & intersectPoints
Intersect points, that have to be freed after tessellation.
Definition opengl_gal.h:348
Structure to keep VIEW_CONTROLS settings for easy store/restore operations.
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:708
VECTOR2< double > VECTOR2D
Definition vector2d.h:707
Class to handle an item held in a container.