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 (C) 2020-2021 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, you may find one here:
23 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
24 * or you may search the http://www.gnu.org website for the version 2 license,
25 * or you may write to the Free Software Foundation, Inc.,
26 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
27 */
28
29#ifndef OPENGLGAL_H_
30#define OPENGLGAL_H_
31
32// GAL imports
35#include <gal/opengl/shader.h>
41#include <gal/hidpi_gl_canvas.h>
42
43#include <unordered_map>
44#include <memory>
45#include <wx/event.h>
46
47#ifndef CALLBACK
48#define CALLBACK
49#endif
50
52#define SEG_PER_CIRCLE_COUNT 64
53
54struct bitmap_glyph;
55
56namespace KIGFX
57{
58class SHADER;
59class GL_BITMAP_CACHE;
60
61
69class OPENGL_GAL : public GAL, public HIDPI_GL_CANVAS
70{
71public:
85 OPENGL_GAL( GAL_DISPLAY_OPTIONS& aDisplayOptions, wxWindow* aParent,
86 wxEvtHandler* aMouseListener = nullptr, wxEvtHandler* aPaintListener = nullptr,
87 const wxString& aName = wxT( "GLCanvas" ) );
88
90
97 static wxString CheckFeatures( GAL_DISPLAY_OPTIONS& aOptions );
98
99 bool IsOpenGlEngine() 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
109 bool IsVisible() const override
110 {
111 return IsShownOnScreen() && !GetClientRect().IsEmpty();
112 }
113
114 // ---------------
115 // Drawing methods
116 // ---------------
117
119 void DrawLine( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) override;
120
122 void DrawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint,
123 double aWidth ) override;
124
126 void DrawSegmentChain( const std::vector<VECTOR2D>& aPointList, double aWidth ) override;
127 void DrawSegmentChain( const SHAPE_LINE_CHAIN& aLineChain, double aWidth ) override;
128
130 void DrawCircle( const VECTOR2D& aCenterPoint, double aRadius ) override;
131
133 void DrawArc( const VECTOR2D& aCenterPoint, double aRadius, const EDA_ANGLE& aStartAngle,
134 const EDA_ANGLE& aEndAngle ) override;
135
137 void DrawArcSegment( const VECTOR2D& aCenterPoint, double aRadius, const EDA_ANGLE& aStartAngle,
138 const EDA_ANGLE& aEndAngle, double aWidth, double aMaxError ) override;
139
141 void DrawRectangle( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint ) override;
142
144 void DrawPolyline( const std::deque<VECTOR2D>& aPointList ) override;
145 void DrawPolyline( const std::vector<VECTOR2D>& aPointList ) override;
146 void DrawPolyline( const VECTOR2D aPointList[], int aListSize ) override;
147 void DrawPolyline( const SHAPE_LINE_CHAIN& aLineChain ) override;
148
150 void DrawPolylines( const std::vector<std::vector<VECTOR2D>>& aPointLists ) override;
151
153 void DrawPolygon( const std::deque<VECTOR2D>& aPointList ) override;
154 void DrawPolygon( const VECTOR2D aPointList[], int aListSize ) override;
155 void DrawPolygon( const SHAPE_POLY_SET& aPolySet, bool aStrokeTriangulation = false ) override;
156 void DrawPolygon( const SHAPE_LINE_CHAIN& aPolySet ) override;
157
159 virtual void DrawGlyph( const KIFONT::GLYPH& aGlyph, int aNth, int aTotal ) override;
160
162 virtual void DrawGlyphs( const std::vector<std::unique_ptr<KIFONT::GLYPH>>& aGlyphs ) override;
163
165 void DrawCurve( const VECTOR2D& startPoint, const VECTOR2D& controlPointA,
166 const VECTOR2D& controlPointB, const VECTOR2D& endPoint,
167 double aFilterValue = 0.0 ) override;
168
170 void DrawBitmap( const BITMAP_BASE& aBitmap, double alphaBlend = 1.0 ) override;
171
173 void BitmapText( const wxString& aText, const VECTOR2I& aPosition,
174 const EDA_ANGLE& aAngle ) override;
175
177 void DrawGrid() override;
178
179 // --------------
180 // Screen methods
181 // --------------
182
184 void ResizeScreen( int aWidth, int aHeight ) override;
185
187 bool Show( bool aShow ) override;
188
190 int GetSwapInterval() const override { return m_swapInterval; };
191
193 void Flush() override;
194
196 void ClearScreen( ) override;
197
198 // --------------
199 // Transformation
200 // --------------
201
203 void Transform( const MATRIX3x3D& aTransformation ) override;
204
206 void Rotate( double aAngle ) override;
207
209 void Translate( const VECTOR2D& aTranslation ) override;
210
212 void Scale( const VECTOR2D& aScale ) override;
213
215 void Save() override;
216
218 void Restore() override;
219
220 // --------------------------------------------
221 // Group methods
222 // ---------------------------------------------
223
225 int BeginGroup() override;
226
228 void EndGroup() override;
229
231 void DrawGroup( int aGroupNumber ) override;
232
234 void ChangeGroupColor( int aGroupNumber, const COLOR4D& aNewColor ) override;
235
237 void ChangeGroupDepth( int aGroupNumber, int aDepth ) override;
238
240 void DeleteGroup( int aGroupNumber ) override;
241
243 void ClearCache() override;
244
245 // --------------------------------------------------------
246 // Handling the world <-> screen transformation
247 // --------------------------------------------------------
248
250 void SetTarget( RENDER_TARGET aTarget ) override;
251
253 RENDER_TARGET GetTarget() const override;
254
256 void ClearTarget( RENDER_TARGET aTarget ) override;
257
259 virtual bool HasTarget( RENDER_TARGET aTarget ) override;
260
262 void SetNegativeDrawMode( bool aSetting ) override {}
263
265 void StartDiffLayer() override;
266 //
268 void EndDiffLayer() override;
269
270 void ComputeWorldScreenMatrix() override;
271
272 // -------
273 // Cursor
274 // -------
275
277 bool SetNativeCursorStyle( KICURSOR aCursor ) override;
278
280 void DrawCursor( const VECTOR2D& aCursorPosition ) override;
281
288 void PostPaint( wxPaintEvent& aEvent );
289
290 void SetMouseListener( wxEvtHandler* aMouseListener )
291 {
292 m_mouseListener = aMouseListener;
293 }
294
295 void SetPaintListener( wxEvtHandler* aPaintListener )
296 {
297 m_paintListener = aPaintListener;
298 }
299
300 void EnableDepthTest( bool aEnabled = false ) override;
301
302 bool IsContextLocked() override
303 {
304 return m_isContextLocked;
305 }
306
307 void LockContext( int aClientCookie ) override;
308
309 void UnlockContext( int aClientCookie ) override;
310
312 void BeginDrawing() override;
313
315 void EndDrawing() override;
316
319 {
322
324 std::deque<std::shared_ptr<GLdouble>>& intersectPoints;
325 };
326
327private:
329 typedef GAL super;
330
331 static wxGLContext* m_glMainContext;
332 wxGLContext* m_glPrivContext;
334 static int m_instanceCounter;
335 wxEvtHandler* m_mouseListener;
336 wxEvtHandler* m_paintListener;
337
338 static GLuint g_fontTexture;
339
340 // Vertex buffer objects related fields
341 typedef std::unordered_map< unsigned int, std::shared_ptr<VERTEX_ITEM> > GROUPS_MAP;
342
344 unsigned int m_groupCounter;
351
352 // Framebuffer & compositing
354 unsigned int m_mainBuffer;
355 unsigned int m_overlayBuffer;
356 unsigned int m_tempBuffer;
358
359 // Shader
362
363 // Internal flags
376
378
379 std::unique_ptr<GL_BITMAP_CACHE> m_bitmapCache;
380
381 // Polygon tesselation
382 GLUtesselator* m_tesselator;
383 std::deque<std::shared_ptr<GLdouble>> m_tessIntersects;
384
386 void beginUpdate() override;
387
389 void endUpdate() override;
390
392 bool updatedGalDisplayOptions( const GAL_DISPLAY_OPTIONS& aOptions ) override;
393
402 void drawLineQuad( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint,
403 bool aReserve = true );
404
410 void reserveLineQuads( const int aLineCount );
411
423 void drawSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle );
424
433 void drawFilledSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle );
434
444 void drawStrokedSemiCircle( const VECTOR2D& aCenterPoint, double aRadius, double aAngle,
445 bool aReserve = true );
446
452 void drawCircle( const VECTOR2D& aCenterPoint, double aRadius, bool aReserve = true );
453
461 void drawPolyline( const std::function<VECTOR2D( int )>& aPointGetter, int aPointCount,
462 bool aReserve = true );
463
471 void drawSegmentChain( const std::function<VECTOR2D( int )>& aPointGetter, int aPointCount,
472 double aWidth, bool aReserve = true );
473
477 void drawSegment( const VECTOR2D& aStartPoint, const VECTOR2D& aEndPoint, double aWidth,
478 bool aReserve = true );
479
487 void drawPolygon( GLdouble* aPoints, int aPointCount );
488
495 void drawTriangulatedPolyset( const SHAPE_POLY_SET& aPoly, bool aStrokeTriangulation );
496
506 int drawBitmapChar( unsigned long aChar, bool aReserve = true );
507
519 void drawBitmapOverbar( double aLength, double aHeight, bool aReserve = true );
520
528 std::pair<VECTOR2D, float> computeBitmapTextSize( const UTF8& aText ) const;
529
530 // Event handling
536 void onPaint( wxPaintEvent& aEvent );
537
543 void skipMouseEvent( wxMouseEvent& aEvent );
544
550 void onSetNativeCursor( wxSetCursorEvent& aEvent );
551
555 void blitCursor();
556
562 unsigned int getNewGroupNumber();
563
567 double calcAngleStep( double aRadius ) const
568 {
569 // Bigger arcs need smaller alpha increment to make them look smooth
570 return std::min( 1e6 / aRadius, 2.0 * M_PI / SEG_PER_CIRCLE_COUNT );
571 }
572
573 double getWorldPixelSize() const;
574
576
582 void init();
583};
584} // namespace KIGFX
585
586#endif // OPENGLGAL_H_
This class handle bitmap images in KiCad.
Definition: bitmap_base.h:52
wxGLCanvas wrapper for HiDPI/Retina support.
A color representation with 4 components: red, green, blue, alpha.
Definition: color4d.h:103
Abstract interface for drawing on a 2D-surface.
OpenGL implementation of the Graphics Abstraction Layer.
Definition: opengl_gal.h:70
void Transform(const MATRIX3x3D &aTransformation) override
Transform the context.
void drawPolygon(GLdouble *aPoints, int aPointCount)
Draw a filled polygon.
void ChangeGroupDepth(int aGroupNumber, int aDepth) override
Change the depth (Z-axis position) of the group.
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.
Definition: opengl_gal.cpp:763
unsigned int m_groupCounter
Counter used for generating keys for groups.
Definition: opengl_gal.h:344
void EndDiffLayer() override
Ends rendering of a differential layer.
std::unordered_map< unsigned int, std::shared_ptr< VERTEX_ITEM > > GROUPS_MAP
Definition: opengl_gal.h:341
VERTEX_MANAGER * m_overlayManager
Container for storing overlaid VERTEX_ITEMs.
Definition: opengl_gal.h:349
void Scale(const VECTOR2D &aScale) override
Scale the context.
bool m_isInitialized
Basic initialization flag, has to be done when the window is visible.
Definition: opengl_gal.h:367
VERTEX_MANAGER * m_currentManager
Currently used VERTEX_MANAGER (for storing VERTEX_ITEMs).
Definition: opengl_gal.h:345
void drawCircle(const VECTOR2D &aCenterPoint, double aRadius, bool aReserve=true)
Internal method for circle drawing.
Definition: opengl_gal.cpp:827
std::deque< std::shared_ptr< GLdouble > > m_tessIntersects
Definition: opengl_gal.h:383
void DrawCircle(const VECTOR2D &aCenterPoint, double aRadius) override
Draw a circle using world coordinates.
Definition: opengl_gal.cpp:821
void SetNegativeDrawMode(bool aSetting) override
Set negative draw mode in the renderer.
Definition: opengl_gal.h:262
bool IsInitialized() const override
Return the initialization status for the canvas.
Definition: opengl_gal.h:102
void LockContext(int aClientCookie) override
Use GAL_CONTEXT_LOCKER RAII object unless you know what you're doing.
Definition: opengl_gal.cpp:699
unsigned int m_mainBuffer
Main rendering target.
Definition: opengl_gal.h:354
std::unique_ptr< GL_BITMAP_CACHE > m_bitmapCache
Definition: opengl_gal.h:379
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:302
void SetTarget(RENDER_TARGET aTarget) override
Set the target for rendering.
void blitCursor()
Blit cursor into the current screen.
static wxString CheckFeatures(GAL_DISPLAY_OPTIONS &aOptions)
Checks OpenGL features.
Definition: opengl_gal.cpp:388
void ClearTarget(RENDER_TARGET aTarget) override
Clear the target for rendering.
void drawBitmapOverbar(double aLength, double aHeight, bool aReserve=true)
Draw an overbar over the currently drawn text.
void EndGroup() override
End the group.
bool m_isBitmapFontInitialized
Is the shader set to use bitmap fonts?
Definition: opengl_gal.h:366
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.
void BitmapText(const wxString &aText, const VECTOR2I &aPosition, const EDA_ANGLE &aAngle) override
Draw a text using a bitmap font.
bool updatedGalDisplayOptions(const GAL_DISPLAY_OPTIONS &aOptions) override
Handle updating display options.
Definition: opengl_gal.cpp:428
unsigned int m_overlayBuffer
Auxiliary rendering target (for menus etc.)
Definition: opengl_gal.h:355
void PostPaint(wxPaintEvent &aEvent)
Function PostPaint posts an event to m_paint_listener.
Definition: opengl_gal.cpp:420
void DrawArc(const VECTOR2D &aCenterPoint, double aRadius, const EDA_ANGLE &aStartAngle, const EDA_ANGLE &aEndAngle) override
Draw an arc.
Definition: opengl_gal.cpp:888
OPENGL_COMPOSITOR * m_compositor
Handles multiple rendering targets.
Definition: opengl_gal.h:353
VERTEX_MANAGER * m_cachedManager
Container for storing cached VERTEX_ITEMs.
Definition: opengl_gal.h:347
void Translate(const VECTOR2D &aTranslation) override
Translate the context.
void SetPaintListener(wxEvtHandler *aPaintListener)
Definition: opengl_gal.h:295
void DrawPolyline(const std::deque< VECTOR2D > &aPointList) override
Draw a polyline.
void DrawCurve(const VECTOR2D &startPoint, const VECTOR2D &controlPointA, const VECTOR2D &controlPointB, const VECTOR2D &endPoint, double aFilterValue=0.0) override
Draw a cubic bezier spline.
void drawFilledSemiCircle(const VECTOR2D &aCenterPoint, double aRadius, double aAngle)
Draw a filled semicircle.
void onPaint(wxPaintEvent &aEvent)
This is the OnPaint event handler.
void DrawGroup(int aGroupNumber) override
Draw the stored group.
void Restore() override
Restore the context.
GLint ufm_worldPixelSize
Definition: opengl_gal.h:372
void DrawGrid() override
void DrawSegmentChain(const std::vector< VECTOR2D > &aPointList, double aWidth) override
Draw a chain of rounded segments.
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.
void Flush() override
Force all remaining objects to be drawn.
GLint ufm_antialiasingOffset
Definition: opengl_gal.h:375
void DeleteGroup(int aGroupNumber) override
Delete the group from the memory.
bool IsVisible() const override
Return true if the GAL canvas is visible on the screen.
Definition: opengl_gal.h:109
void DrawArcSegment(const VECTOR2D &aCenterPoint, double aRadius, const EDA_ANGLE &aStartAngle, const EDA_ANGLE &aEndAngle, double aWidth, double aMaxError) override
Draw an arc segment.
Definition: opengl_gal.cpp:960
wxEvtHandler * m_mouseListener
Definition: opengl_gal.h:335
int m_swapInterval
Used to store swap interval information.
Definition: opengl_gal.h:333
void ClearCache() override
Delete all data created during caching of graphic items.
double getWorldPixelSize() const
Definition: opengl_gal.cpp:457
void DrawSegment(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint, double aWidth) override
Draw a rounded segment.
Definition: opengl_gal.cpp:756
GROUPS_MAP m_groups
Stores information about VBO objects (groups)
Definition: opengl_gal.h:343
void endUpdate() override
Definition: opengl_gal.cpp:739
void ClearScreen() override
Clear the screen.
void ResizeScreen(int aWidth, int aHeight) override
Resizes the canvas.
void DrawPolygon(const std::deque< VECTOR2D > &aPointList) override
Draw a polygon.
void drawTriangulatedPolyset(const SHAPE_POLY_SET &aPoly, bool aStrokeTriangulation)
Draw a set of polygons with a cached triangulation.
void DrawCursor(const VECTOR2D &aCursorPosition) override
Draw the cursor.
int GetSwapInterval() const override
Return the swap interval. -1 for adaptive, 0 for disabled/unknown.
Definition: opengl_gal.h:190
GAL super
Super class definition.
Definition: opengl_gal.h:329
void SetMouseListener(wxEvtHandler *aMouseListener)
Definition: opengl_gal.h:290
void DrawRectangle(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint) override
Draw a rectangle.
VERTEX_MANAGER * m_nonCachedManager
Container for storing non-cached VERTEX_ITEMs.
Definition: opengl_gal.h:348
int drawBitmapChar(unsigned long aChar, bool aReserve=true)
Draw a single character using bitmap font.
GLUtesselator * m_tesselator
Definition: opengl_gal.h:382
wxEvtHandler * m_paintListener
Definition: opengl_gal.h:336
void StartDiffLayer() override
Begins rendering of a differential layer.
bool m_isContextLocked
Used for assertion checking.
Definition: opengl_gal.h:370
void Save() override
Save the context.
wxCursor m_currentwxCursor
wxCursor showing the current native cursor
Definition: opengl_gal.h:377
bool m_isFramebufferInitialized
Are the framebuffers initialized?
Definition: opengl_gal.h:364
void ComputeWorldScreenMatrix() override
Compute the world <-> screen transformation matrix.
bool Show(bool aShow) override
Shows/hides the GAL canvas.
static GLuint g_fontTexture
Bitmap font texture handle (shared)
Definition: opengl_gal.h:338
virtual bool HasTarget(RENDER_TARGET aTarget) override
Return true if the target exists.
void reserveLineQuads(const int aLineCount)
Reserves specified number of line quads.
void DrawLine(const VECTOR2D &aStartPoint, const VECTOR2D &aEndPoint) override
Draw a line.
Definition: opengl_gal.cpp:748
void beginUpdate() override
Definition: opengl_gal.cpp:723
double calcAngleStep(double aRadius) const
Compute the angle step when drawing arcs/circles approximated with lines.
Definition: opengl_gal.h:567
virtual void DrawGlyph(const KIFONT::GLYPH &aGlyph, int aNth, int aTotal) override
Draw a polygon representing a font glyph.
bool m_isGrouping
Was a group started?
Definition: opengl_gal.h:369
void BeginDrawing() override
Start/end drawing functions, draw calls can be only made in between the calls to BeginDrawing()/EndDr...
Definition: opengl_gal.cpp:472
GLint ufm_screenPixelSize
Definition: opengl_gal.h:373
void Rotate(double aAngle) override
Rotate the context.
int BeginGroup() override
Begin a group.
GLint ufm_pixelSizeMultiplier
Definition: opengl_gal.h:374
VECTOR2D getScreenPixelSize() const
Definition: opengl_gal.cpp:464
bool SetNativeCursorStyle(KICURSOR aCursor) override
Set the cursor in the native panel.
void DrawBitmap(const BITMAP_BASE &aBitmap, double alphaBlend=1.0) override
Draw a bitmap image.
void drawPolyline(const std::function< VECTOR2D(int)> &aPointGetter, int aPointCount, bool aReserve=true)
Generic way of drawing a polyline stored in different containers.
RENDER_TARGET GetTarget() const override
Get the currently used target for rendering.
void UnlockContext(int aClientCookie) override
Definition: opengl_gal.cpp:709
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:350
virtual void DrawGlyphs(const std::vector< std::unique_ptr< KIFONT::GLYPH > > &aGlyphs) override
Draw polygons representing font glyphs.
void onSetNativeCursor(wxSetCursorEvent &aEvent)
Give the correct cursor image when the native widget asks for it.
void EnableDepthTest(bool aEnabled=false) override
void EndDrawing() override
End the drawing, needs to be called for every new frame.
Definition: opengl_gal.cpp:641
SHADER * m_shader
There is only one shader used for different objects.
Definition: opengl_gal.h:360
void DrawPolylines(const std::vector< std::vector< VECTOR2D > > &aPointLists) override
Draw multiple polylines.
RENDER_TARGET m_currentTarget
Current rendering target.
Definition: opengl_gal.h:357
wxGLContext * m_glPrivContext
Canvas-specific OpenGL context.
Definition: opengl_gal.h:332
void ChangeGroupColor(int aGroupNumber, const COLOR4D &aNewColor) override
Change the color used to draw the group.
static bool m_isBitmapFontLoaded
Is the bitmap font texture loaded?
Definition: opengl_gal.h:365
static wxGLContext * m_glMainContext
Parent OpenGL context.
Definition: opengl_gal.h:331
unsigned int m_tempBuffer
Temporary rendering target (for diffing etc.)
Definition: opengl_gal.h:356
void init()
Basic OpenGL initialization and feature checks.
static int m_instanceCounter
GL GAL instance counter.
Definition: opengl_gal.h:334
bool IsOpenGlEngine() override
Return true if the GAL engine is a OpenGL based type.
Definition: opengl_gal.h:99
Provide the access to the OpenGL shaders.
Definition: shader.h:77
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:71
KICURSOR
Definition: cursors.h:34
The Cairo implementation of the graphics abstraction layer.
Definition: color4d.cpp:246
RENDER_TARGET
RENDER_TARGET: Possible rendering targets.
Definition: definitions.h:47
Class to store instances of VERTEX without caching.
Handle multitarget rendering (ie.
#define SEG_PER_CIRCLE_COUNT
Definition: opengl_gal.h:52
VERTEX_MANAGER * vboManager
Manager used for storing new vertices.
Definition: opengl_gal.h:321
std::deque< std::shared_ptr< GLdouble > > & intersectPoints
Intersect points, that have to be freed after tessellation.
Definition: opengl_gal.h:324
VECTOR2< double > VECTOR2D
Definition: vector2d.h:587
Class to handle an item held in a container.