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
51#define SEG_PER_CIRCLE_COUNT 64
52
53class GLUtesselator;
54class wxImage;
55
56struct bitmap_glyph;
57
58namespace KIGFX
59{
60class SHADER;
61class GL_BITMAP_CACHE;
62
63
71class GAL_API OPENGL_GAL : public GAL, public HIDPI_GL_CANVAS
72{
73public:
86 OPENGL_GAL( const KIGFX::VC_SETTINGS& aVcSettings, GAL_DISPLAY_OPTIONS& aDisplayOptions, wxWindow* aParent,
87 wxEvtHandler* aMouseListener = nullptr, wxEvtHandler* aPaintListener = nullptr,
88 const wxString& aName = wxT( "GLCanvas" ) );
89
91
98 static wxString CheckFeatures( GAL_DISPLAY_OPTIONS& aOptions );
99
100 bool IsOpenGlEngine() override { return true; }
101
103 bool IsInitialized() const override
104 {
105 // is*Initialized flags, but it is enough for OpenGL to show up
106 return IsShownOnScreen() && !GetClientRect().IsEmpty();
107 }
108
109 bool IsVisible() const override
110 {
111 // VIEW skips cached item updates for invisible canvases, which a lost context cannot take
112 return GetContextLoss() == GAL_CONTEXT_LOSS::NONE && IsShownOnScreen() && !GetClientRect().IsEmpty();
113 }
114
115 void SetMinLineWidth( float aLineWidth ) override;
116
117 // ---------------
118 // Drawing methods
119 // ---------------
120
122 void DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) override;
123
125 void DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint,
126 double aWidth ) override;
127
129 void DrawSegmentChain( const std::vector<VECTOR2D>& aPointList, double aWidth ) override;
130 void DrawSegmentChain( const SHAPE_LINE_CHAIN& aLineChain, double aWidth ) override;
131
133 void DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) override;
134
136 void DrawHoleWall( const VECTOR2D& aCenterPoint, double aHoleRadius,
137 double aWallWidth ) override;
138
140 void DrawArc( const VECTOR2D& aCenterPoint, double aRadius, const EDA_ANGLE& aStartAngle,
141 const EDA_ANGLE& aAngle ) override;
142
144 void DrawArcSegment( const VECTOR2D& aCenterPoint, double aRadius, const EDA_ANGLE& aStartAngle,
145 const EDA_ANGLE& aAngle, double aWidth, double aMaxError ) override;
146
148 void DrawEllipse( const VECTOR2D& aCenterPoint, double aMajorRadius, double aMinorRadius,
149 const EDA_ANGLE& aRotation ) override;
150
152 void DrawEllipseArc( const VECTOR2D& aCenterPoint, double aMajorRadius, double aMinorRadius,
153 const EDA_ANGLE& aRotation, const EDA_ANGLE& aStartAngle,
154 const EDA_ANGLE& aEndAngle ) override;
155
157 void DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) override;
158
160 void DrawPolyline( const std::deque<VECTOR2D>& aPointList ) override;
161 void DrawPolyline( const std::vector<VECTOR2D>& aPointList ) override;
162 void DrawPolyline( const VECTOR2D aPointList[], int aListSize ) override;
163 void DrawPolyline( const SHAPE_LINE_CHAIN& aLineChain ) override;
164
166 void DrawPolylines( const std::vector<std::vector<VECTOR2D>>& aPointLists ) override;
167
169 void DrawPolygon( const std::deque<VECTOR2D>& aPointList ) override;
170 void DrawPolygon( const VECTOR2D aPointList[], int aListSize ) override;
171 void DrawPolygon( const SHAPE_POLY_SET& aPolySet, bool aStrokeTriangulation = false ) override;
172 void DrawPolygon( const SHAPE_LINE_CHAIN& aPolySet ) override;
173
175 virtual void DrawGlyph( const KIFONT::GLYPH& aGlyph, int aNth, int aTotal ) override;
176
178 virtual void DrawGlyphs( const std::vector<std::unique_ptr<KIFONT::GLYPH>>& aGlyphs ) override;
179
181 void DrawCurve( const VECTOR2D& startPoint, const VECTOR2D& controlPointA,
182 const VECTOR2D& controlPointB, const VECTOR2D& endPoint,
183 double aFilterValue = 0.0 ) override;
184
186 void DrawBitmap( const BITMAP_BASE& aBitmap, double alphaBlend = 1.0 ) override;
187
189 void BitmapText( const wxString& aText, const VECTOR2I& aPosition,
190 const EDA_ANGLE& aAngle ) override;
191
193 void DrawGrid() override;
194
195 // --------------
196 // Screen methods
197 // --------------
198
200 void ResizeScreen( int aWidth, int aHeight ) override;
201
203 bool Show( bool aShow ) override;
204
206 int GetSwapInterval() const override { return m_swapInterval; };
207
209 void Flush() override;
210
211 void ClearScreen() override;
212
213 // --------------
214 // Transformation
215 // --------------
216
218 void Transform( const MATRIX3x3D& aTransformation ) override;
219
221 void Rotate( double aAngle ) override;
222
224 void Translate( const VECTOR2D& aTranslation ) override;
225
227 void Scale( const VECTOR2D& aScale ) override;
228
230 void Save() override;
231
233 void Restore() override;
234
235 // --------------------------------------------
236 // Group methods
237 // ---------------------------------------------
238
240 int BeginGroup() override;
241
243 void EndGroup() override;
244
246 void DrawGroup( int aGroupNumber ) override;
247
249 void ChangeGroupColor( int aGroupNumber, const COLOR4D& aNewColor ) override;
250
252 void ChangeGroupDepth( int aGroupNumber, int aDepth ) override;
253
255 void DeleteGroup( int aGroupNumber ) override;
256
258 void ClearCache() override;
259
260 // --------------------------------------------------------
261 // Handling the world <-> screen transformation
262 // --------------------------------------------------------
263
265 void SetTarget( RENDER_TARGET aTarget ) override;
266
268 RENDER_TARGET GetTarget() const override;
269
271 void ClearTarget( RENDER_TARGET aTarget ) override;
272
274 virtual bool HasTarget( RENDER_TARGET aTarget ) override;
275
277 void SetNegativeDrawMode( bool aSetting ) override {}
278
280 void StartDiffLayer() override;
281 //
283 void EndDiffLayer() override;
284
285 void ComputeWorldScreenMatrix() override;
286
287 // -------
288 // Cursor
289 // -------
290
291 bool SetNativeCursorStyle( KICURSOR aCursor, bool aHiDPI ) override;
292
294 void DrawCursor( const VECTOR2D& aCursorPosition ) override;
295
302 void PostPaint( wxPaintEvent& aEvent );
303
304 void SetMouseListener( wxEvtHandler* aMouseListener )
305 {
306 m_mouseListener = aMouseListener;
307 }
308
309 void SetPaintListener( wxEvtHandler* aPaintListener )
310 {
311 m_paintListener = aPaintListener;
312 }
313
314 void EnableDepthTest( bool aEnabled = false ) override;
315
316 bool IsContextLocked() override
317 {
318 return m_isContextLocked;
319 }
320
321 bool IsContextValid() const override
322 {
323 return m_isContextValid;
324 }
325
326 GAL_CONTEXT_LOSS GetContextLoss() const override;
327
328 bool IsResetSettled() override;
329
330 void LockContext( int aClientCookie ) override;
331
332 void UnlockContext( int aClientCookie ) override;
333
335 void BeginDrawing() override;
336
338 void EndDrawing() override;
339
340 bool GetScreenshot( wxImage& aDstImage );
341
344 {
347
349 std::deque<std::shared_ptr<GLdouble>>& intersectPoints;
350 };
351
352private:
354 typedef GAL super;
355
356 static wxGLContext* m_glMainContext;
357 wxGLContext* m_glPrivContext;
359 static int m_instanceCounter;
360 static int m_contextGroupId;
363 static bool m_glLoaded;
364 static std::set<OPENGL_GAL*> m_instances;
365 static bool m_resetSettled;
366
368 static GL_RESET_BUDGET::CLOCK::time_point m_resetDetectedAt;
369
371 wxEvtHandler* m_mouseListener;
372 wxEvtHandler* m_paintListener;
373
374 static GLuint g_fontTexture;
375
376 // Vertex buffer objects related fields
377 typedef std::unordered_map< unsigned int, std::shared_ptr<VERTEX_ITEM> > GROUPS_MAP;
378
380 unsigned int m_groupCounter;
386
389
390 // Framebuffer & compositing
392 unsigned int m_mainBuffer;
393 unsigned int m_overlayBuffer;
394 unsigned int m_tempBuffer;
396
397 // Shader
400
401 // Internal flags
418
421
422 std::unique_ptr<GL_BITMAP_CACHE> m_bitmapCache;
423
424 // Polygon tesselation
425 GLUtesselator* m_tesselator;
426 std::deque<std::shared_ptr<GLdouble>> m_tessIntersects;
427
428 void beginUpdate() override;
429
430 void endUpdate() override;
431
433 bool updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions ) override;
434
443 void drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint,
444 bool aReserve = true );
445
451 void reserveLineQuads( const int aLineCount );
452
464 void drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle );
465
474 void drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle );
475
485 void drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle,
486 bool aReserve = true );
487
495 void drawCircle( const VECTOR2D& aCenterPoint, double aRadius, bool aReserve = true );
496
504 void drawPolyline( const std::function<VECTOR2D( int )>& aPointGetter, int aPointCount,
505 bool aReserve = true );
506
515 void drawSegmentChain( const std::function<VECTOR2D( int )>& aPointGetter, int aPointCount,
516 double aWidth, bool aReserve = true );
517
521 void drawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aWidth,
522 bool aReserve = true );
523
531 void drawPolygon( GLdouble* aPoints, int aPointCount );
532
540 void drawTriangulatedPolyset( const SHAPE_POLY_SET& aPoly, bool aStrokeTriangulation );
541
551 int drawBitmapChar( unsigned long aChar, bool aReserve = true );
552
564 void drawBitmapOverbar( double aLength, double aHeight, bool aReserve = true );
565
572 void drawGridSources();
573
577 void drawGridCoverageShape( const GRID_SOURCE& aSrc );
578
586 std::pair<VECTOR2D, float> computeBitmapTextSize( const UTF8& aText ) const;
587
588 // Event handling
594 void onPaint( wxPaintEvent& aEvent );
595
601 void skipMouseEvent( wxMouseEvent& aEvent );
602
608 void skipGestureEvent( wxGestureEvent& aEvent );
609
615 void onSetNativeCursor( wxSetCursorEvent& aEvent );
616
620 void blitCursor();
621
627 unsigned int getNewGroupNumber();
628
632 double calcAngleStep( double aRadius ) const
633 {
634 // Bigger arcs need smaller alpha increment to make them look smooth
635 return std::min( 1e6 / aRadius, 2.0 * M_PI / SEG_PER_CIRCLE_COUNT );
636 }
637
638 double getWorldPixelSize() const;
639
640 VECTOR2D getScreenPixelSize() const;
641
647 void setupShaderParameters();
648
654 void init();
655
657 bool detectContextReset();
658
660 void orphanContextGroup();
661};
662} // namespace KIGFX
663
664#endif // OPENGLGAL_H_
This class handle bitmap images in KiCad.
Definition bitmap_base.h:45
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:380
std::unordered_map< unsigned int, std::shared_ptr< VERTEX_ITEM > > GROUPS_MAP
Definition opengl_gal.h:377
VERTEX_MANAGER * m_overlayManager
Container for storing overlaid VERTEX_ITEMs.
Definition opengl_gal.h:385
bool m_isInitialized
Basic initialization flag, has to be done when the window is visible.
Definition opengl_gal.h:405
VERTEX_MANAGER * m_currentManager
Currently used VERTEX_MANAGER (for storing VERTEX_ITEMs).
Definition opengl_gal.h:381
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:426
void SetNegativeDrawMode(bool aSetting) override
Set negative draw mode in the renderer.
Definition opengl_gal.h:277
bool IsInitialized() const override
Return the initialization status for the canvas.
Definition opengl_gal.h:103
WX_CURSOR_TYPE m_currentwxCursor
wx cursor showing the current native cursor.
Definition opengl_gal.h:420
unsigned int m_mainBuffer
Main rendering target.
Definition opengl_gal.h:392
static std::set< OPENGL_GAL * > m_instances
Canvases to repaint after a reset.
Definition opengl_gal.h:364
std::unique_ptr< GL_BITMAP_CACHE > m_bitmapCache
Definition opengl_gal.h:422
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:316
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:404
static GL_RESET_BUDGET m_resetBudget
Rate of resets tolerated before falling back.
Definition opengl_gal.h:362
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:393
OPENGL_COMPOSITOR * m_compositor
Handles multiple rendering targets.
Definition opengl_gal.h:391
VERTEX_MANAGER * m_cachedManager
Container for storing cached VERTEX_ITEMs.
Definition opengl_gal.h:383
void SetPaintListener(wxEvtHandler *aPaintListener)
Definition opengl_gal.h:309
static bool m_glLoaded
GL entry points are loaded, so resets can be queried.
Definition opengl_gal.h:363
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:415
int m_ownContextGroupId
Group this canvas' contexts were created in.
Definition opengl_gal.h:370
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:368
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:414
bool IsVisible() const override
Return true if the GAL canvas is visible on the screen.
Definition opengl_gal.h:109
wxEvtHandler * m_mouseListener
Definition opengl_gal.h:371
int m_swapInterval
Used to store swap interval information.
Definition opengl_gal.h:358
GROUPS_MAP m_groups
Stores information about VBO objects (groups)
Definition opengl_gal.h:379
void endUpdate() override
Disable item update mode.
GLint ufm_fontTextureWidth
Definition opengl_gal.h:417
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:206
GAL super
Super class definition.
Definition opengl_gal.h:354
bool IsContextValid() const override
Check whether the locked context is actually the current one.
Definition opengl_gal.h:321
void SetMouseListener(wxEvtHandler *aMouseListener)
Definition opengl_gal.h:304
VERTEX_MANAGER * m_nonCachedManager
Container for storing non-cached VERTEX_ITEMs.
Definition opengl_gal.h:384
int drawBitmapChar(unsigned long aChar, bool aReserve=true)
Draw a single character using bitmap font.
GLUtesselator * m_tesselator
Definition opengl_gal.h:425
wxEvtHandler * m_paintListener
Definition opengl_gal.h:372
void drawGridCoverageShape(const GRID_SOURCE &aSrc)
Fill a source's coverage region into the current color/stencil state.
static bool m_resetSettled
Driver finished the last reset.
Definition opengl_gal.h:365
bool m_isContextLocked
Used for assertion checking.
Definition opengl_gal.h:408
bool m_isFramebufferInitialized
Are the framebuffers initialized?
Definition opengl_gal.h:402
static GLuint g_fontTexture
Bitmap font texture handle (shared)
Definition opengl_gal.h:374
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.
double calcAngleStep(double aRadius) const
Compute the angle step when drawing arcs/circles approximated with lines.
Definition opengl_gal.h:632
bool m_isGrouping
Was a group started?
Definition opengl_gal.h:407
GLint ufm_screenPixelSize
Definition opengl_gal.h:412
GLint ufm_pixelSizeMultiplier
Definition opengl_gal.h:413
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:360
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:388
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:399
bool m_isContextValid
Did the last lock make us current?
Definition opengl_gal.h:409
RENDER_TARGET m_currentTarget
Current rendering target.
Definition opengl_gal.h:395
wxGLContext * m_glPrivContext
Canvas-specific OpenGL context.
Definition opengl_gal.h:357
static bool m_isBitmapFontLoaded
Is the bitmap font texture loaded?
Definition opengl_gal.h:403
static bool m_resetBudgetExhausted
Resets came too often to keep using OpenGL.
Definition opengl_gal.h:361
static wxGLContext * m_glMainContext
Parent OpenGL context.
Definition opengl_gal.h:356
unsigned int m_tempBuffer
Temporary rendering target (for diffing etc.)
Definition opengl_gal.h:394
static int m_instanceCounter
GL GAL instance counter.
Definition opengl_gal.h:359
bool IsOpenGlEngine() override
Return true if the GAL engine is a OpenGL based type.
Definition opengl_gal.h:100
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:40
wxCursor WX_CURSOR_TYPE
Represents either a wxCursorBundle for wx 3.3+ or a wxCursor for older versions.
Definition cursors.h:35
#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.
#define SEG_PER_CIRCLE_COUNT
The default number of points for circle approximation.
Definition opengl_gal.h:51
void DrawSegment(const ROUND_SEGMENT_2D &aSegment, unsigned int aNrSidesPerCircle)
Draw a thick line segment with rounded ends.
Render-time projection of a grid: GRID_GEOMETRY (kind/origin/pitch/orientation/extent) plus rendering...
Parameters passed to the GLU tesselator.
Definition opengl_gal.h:344
VERTEX_MANAGER * vboManager
Manager used for storing new vertices.
Definition opengl_gal.h:346
std::deque< std::shared_ptr< GLdouble > > & intersectPoints
Intersect points, that have to be freed after tessellation.
Definition opengl_gal.h:349
Structure to keep VIEW_CONTROLS settings for easy store/restore operations.
#define M_PI
VECTOR2< int32_t > VECTOR2I
Definition vector2d.h:708
VECTOR2< double > VECTOR2D
Definition vector2d.h:707
Class to handle an item held in a container.