NAVTOR SDK  v.3.0
Software Development Kit for fast and efficient development of ECDIS, ECS and generic marine applications
gl2d_canvas_interface.h
Go to the documentation of this file.
1 #ifndef SDK_GL2D_CANVAS_INTERFACE_H_
11 #define SDK_GL2D_CANVAS_INTERFACE_H_
12 #pragma once
13 
14 #include <base/inc/platform.h>
15 #include <base/inc/base_types.h>
16 #include <base/inc/sdk_component_base.h>
22 #include <visualizationlayer/inc/vis_const.h>
23 
24 #include "./gl2d_canvas_func/gl2d_canvas_utils_interface.h"
25 #include "./gl2d_canvas_func/gl2d_canvas_projection_func_interface.h"
26 #include "./gl2d_canvas_func/gl2d_canvas_palette_func_interface.h"
27 #include "./gl2d_canvas_func/gl2d_canvas_radar_image_func_interface.h"
28 #include "./gl2d_canvas_func/gl2d_canvas_filled_circles_func_interface.h"
29 #include "./gl2d_canvas_func/gl2d_canvas_pattern_func_interface.h"
30 #include "./gl2d_canvas_func/gl2d_canvas_textbox_func_interface.h"
31 #include "./gl2d_canvas_func/gl2d_canvas_bordered_latin1_text_func_interface.h"
32 #include "./gl2d_canvas_func/gl2d_canvas_latin1_text_func_interface.h"
33 #include "./gl2d_canvas_func/gl2d_canvas_text_func_interface.h"
34 #include "./gl2d_canvas_func/gl2d_canvas_line_mark_func_interface.h"
35 #include "./gl2d_canvas_func/gl2d_canvas_sprites_func_interface.h"
36 #include "./gl2d_canvas_func/gl2d_canvas_textured_line_func_interface.h"
37 #include "./gl2d_canvas_func/gl2d_canvas_texture_func_interface.h"
38 #include "./gl2d_canvas_func/gl2d_canvas_light_source_func_interface.h"
39 #include "./gl2d_canvas_func/gl2d_canvas_mesh_func_interface.h"
40 #include "./gl2d_canvas_func/gl2d_canvas_line_func_interface.h"
41 
42 #include "gl2d_caps_interface.h"
43 #include "gl2d_stats_interface.h"
45 #include "gl2d_textures_storage_interface.h"
46 #include "gl2d_font_interface.h"
48 #include "gl2d_thread_interface.h"
49 #include "gl2d_objects.h"
50 
51 // Disable some of very noisy GCC warnings
52 #if defined (SDK_CC_GCC)
53 # pragma GCC diagnostic push
54 # pragma GCC diagnostic ignored "-Wextra"
55 #endif // SDK_CC_GCC
56 
57 SDK_GL2D_BEGIN_NAMESPACE
58 
61 FWD_DECL_INTERFACE(IGL2DCanvasDrawLock);
63 
66 static const SDKColorF kGL2DTransparentClr = { 0.0f, 0.0f, 0.0f, 0.0f };
68 static const SDKColorF kGL2DWhiteClr = { 1.0f, 1.0f, 1.0f, 1.0f };
69 
73 
77 {
85 
90  kGL2DCanvasPropertyID_DPI = 1,
91 
96 
102 
111 
119 
123 
128 
135 
142 
148 
154 
158 
162 
170 
173 
177 
184 
190 
196 
202 
207 
211 
215 
219 
223 
227 
229  kGL2DCanvasPropertyID_Private = 1000,
230 };
231 
235 {
236  // WGL, Windows only (Internally created and managed context)
237  kGL2DPlatformType_WGL = 0,
238 
239  // EGL, Linux/Android only (Internally created and managed context)
240  kGL2DPlatformType_EGL = 1,
241 
242  // Mesa, Linux only (Internally created and managed context)
243  kGL2DPlatformType_Mesa = 2,
244 
245  // GLX, Linux only (Internally created and managed context)
246  kGL2DPlatformType_GLX = 3,
247 
248  // Platform type is unknown due of given context was created by
249  // external application. But GL2D controls lifetime of given context
250  // by calling create/destroy methods and can activate/deactivate it as well
251  // See IGL2DExtCreatedGlCtx description
252  kGL2DPlatformType_ExternallyCreated = 4,
253 
254  // Platform type is unknown due of given context is fully controlled by
255  // external application. It's assumed that external application also
256  // keeps given context as active in appropriate thread, which was passed via
257  // appropriate set of initial parameters:
258  // kGL2DCreateCanvasSettingIDs_GlThread - Thread to use for any of GL operation
259  // This thread should ALWAYS have active OpenGL context, it is not allowed
260  // to attach different OpenGL contexts to given thread.
261  // kGL2DCreateCanvasSettingIDs_GetGlProcAddr - glGetProcAddress method entry point
262  // kGL2DCreateCanvasSettingIDs_GlLibHandle - Handle to appropriate OpenGL library
263  kGL2DPlatformType_ExternallyManaged = 5,
264 };
265 
269 {
270  kGL2DCanvasType_Auto = 0, // Auto select canvas type
271  kGL2DCanvasType_OpenGL = 1, // OpenGL
272  kGL2DCanvasType_OpenGL_ES2 = 2, // OpenGL ES2
273 };
274 
278 {
279  // Unknown device
280  kGL2DDeviceType_Unknown = 0x00000000L,
281 
282  // List of available generic devices
283  // Generic desktop device (Windows/Linux)
284  kGL2DDeviceType_Generic_Desktop = 0x00000001L,
285  // Generic Android based device
286  kGL2DDeviceType_Generic_Android = 0x00000002L,
287  // Generic iOS based device
288  kGL2DDeviceType_Generic_iOS = 0x00000003L,
289 
290  // List of specific devices
291  // iMX6 based device
292  kGL2DDeviceType_iMX6 = 0x00001000L,
293 
294  // List of test devices, you'll not see most of them in real life
295  // unless you are a Navtor developer
296  // Main device to use for UnitTests (Windows for now)
297  // MacBook Pro 16.1 with AMD Radeon 5500M, running on Windows 10
298  kGL2DDeviceType_BSA_Laptop = 0x80000000L,
299  // Test device use for MESA/EGL/GLX based unittests for Desktop Linux
300  // Ubuntu 19.04, running on VMWare
301  kGL2DDeviceType_DesktopLinux_TestDevice = 0x80000001L,
302  // Test device to perform unittests for iMX6 platform
303  // Navico device with GC2000 videoadapter
304  kGL2DDeviceType_iMX6_TestDevice = 0x80000002L,
305  // Test device to perform unittests for Android platform
306  // Samsung Galaxy S3 with Mali-400 MP videoadapter
307  kGL2DDeviceType_Android_TestDevice_SGS3 = 0x80000003L,
308  // Test device to perform unittests for Android platform
309  // Sony Xperia Z with Adreno 320 videoadapter
310  kGL2DDeviceType_Android_TestDevice_XperiaZ = 0x80000004L,
311  // Test device to perform unittests for Android platform
312  // Huawei MediaPad M5 Pro with Mali-G71 videoadapter
313  kGL2DDeviceType_Android_TestDevice_MediaPadM5Pro = 0x80000005L,
314 };
315 
319 {
320  // NULL cache type
321  kGL2DCacheType_None = 0x00000000UL,
322 
323  // Symbols (letters) textures
324  kGL2DCacheType_SymbolsTextures = 0x00000001UL,
325  // Latin1 characters maps (set of letters) textures
326  kGL2DCacheType_CharMapTextures = 0x00000002UL,
327  // OpenGL buffers (VBO)
328  kGL2DCacheType_GLBuffers = 0x00000004UL,
329 
330  // All available cache types
331  kGL2DCacheType_All = kGL2DCacheType_SymbolsTextures |
332  kGL2DCacheType_CharMapTextures |
333  kGL2DCacheType_GLBuffers,
334 };
335 
339 {
340  // Following set of parameters should be defined in case requested
341  // GL2DPlatformType is equal to kGL2DPlatformType_ExternallyManaged
342  // Either no parameters should be defined or all of them
343 
348 
354 
359  kGL2DCreateCanvasSettingIDs_GlLibHandle = 3,
360 
361  // Following set of parameters should be defined in case requested
362  // GL2DPlatformType is equal to kGL2DPlatformType_ExternallyCreated
363  // Either no parameters should be defined or all of them
364 
370 
371  // Common parameters
372 
380 
384 
388 
393 
397 
401 
406 
411 
414  kGL2DCreateCanvasSettingIDs_DebugContext = 1000,
415 };
416 typedef SDKPropertiesSP IGL2DCreateCanvasSettingsSP;
417 
422 class AutoStartFinishDraw;
427 
429 static const float kGL2DCanvasDefTextBorderWidth = 2.0f;
430 
435 class IGL2DCanvas : public ISDKProperties,
436  public IGL2DCanvasUtils,
437  public IGL2DCanvasProjectionFunc,
438  public IGL2DCanvasPaletteFunc,
439  public IGL2DCanvasRadarImageFunc,
440  public IGL2DCanvasFilledCirclesFunc,
441  public IGL2DCanvasPatternFunc,
442  public IGL2DCanvasTextBoxFunc,
443  public IGL2DCanvasBorderedLatin1TextFunc,
444  public IGL2DCanvasLatin1TextFunc,
445  public IGL2DCanvasTextFunc,
446  public IGL2DCanvasLineMarkFunc,
447  public IGL2DCanvasSpritesFunc,
448  public IGL2DCanvasTexturedLineFunc,
449  public IGL2DCanvasTextureFunc,
450  public IGL2DCanvasLightSourceFunc,
451  public IGL2DCanvasMeshFunc,
452  public IGL2DCanvasLineFunc
453 {
454 public:
456  virtual void SDK_CALLTYPE Dump() const throw() = 0;
457 
459  virtual IGL2DFactorySP SDK_CALLTYPE GetParent() const throw() = 0;
461  virtual IGL2DFontsStorageSP SDK_CALLTYPE GetFontsStorage() const throw() = 0;
463  virtual IGL2DCanvasDrawLockSP SDK_CALLTYPE GetDrawLock() const throw() = 0;
464 
466  virtual GL2DPlatformType SDK_CALLTYPE GetPlatformType() const throw() = 0;
468  virtual GL2DCanvasType SDK_CALLTYPE GetCanvasType() const throw() = 0;
470  virtual GL2DDeviceType SDK_CALLTYPE GetDeviceType() const throw() = 0;
471 
473  virtual IGL2DCapsSP SDK_CALLTYPE GetCaps() const throw() = 0;
475  virtual IGL2DStatsSP SDK_CALLTYPE GetStats() const throw() = 0;
476 
480  const GL2DCanvasOperationType& type) const
481  {
482  const IGL2DCapsSP caps = GetCaps();
483  return caps ? caps->IsCanvasOperationSupported(type) : false;
484  }
485 
519  virtual SDKResult SDK_CALLTYPE LockCanvas(
520  const bool& release_internal_contexts) throw() = 0;
522  virtual SDKResult SDK_CALLTYPE UnLockCanvas() throw() = 0;
524  virtual bool SDK_CALLTYPE IsCanvasLocked() const throw() = 0;
525 
532  virtual SDKResult SDK_CALLTYPE ForceUnlockAndResume() throw() = 0;
533 
538  virtual SDKResult SDK_CALLTYPE GetResourceGlContext(
539  GlCtx& resource_ctx) const throw() = 0;
544  virtual SDKResult SDK_CALLTYPE GetDrawingGlContext(
545  GlCtx& drawing_ctx) const throw() = 0;
546 
550  virtual bool SDK_CALLTYPE IsSameContextForDrawingAndResources() const throw() = 0;
553  inline bool SDK_CALLTYPE IsSeparateContextsForDrawingAndResources() const
555 
566  virtual SDKResult SDK_CALLTYPE EnsureGLDataLoaded() const throw() = 0;
567 
570  virtual SDKResult SDK_CALLTYPE ClearUpCache(
571  const SDKUInt32& cache_id) const throw() = 0;
576  virtual SDKResult SDK_CALLTYPE ReduceCacheSize(
577  const SDKUInt32& cache_id, const SDKUInt64& size_to_reduce) const throw() = 0;
578 
580  virtual SDKResult SDK_CALLTYPE CreateTexturesStorage(
581  IGL2DTexturesStorageSP& textures_storage) const throw() = 0;
582 
592  virtual SDKResult SDK_CALLTYPE DrawTexturesToTexture(
593  const IGL2DTextureSP& output_texture,
594  const SDKMatrix3X2& canvas_transformation,
595  const SDKColorF& output_tex_clear_color,
596  const IGL2DTexturesStorageSP& textures_to_render) const throw() = 0;
597 
602  virtual SDKResult SDK_CALLTYPE StartDraw(
603  const IGL2DTextureSP& texture) throw() = 0;
612  virtual SDKResult SDK_CALLTYPE FinishDraw(const bool& with_glfinish) throw() = 0;
613  inline SDKResult SDK_CALLTYPE FinishDraw()
614  { return FinishDraw(true); }
616  virtual bool SDK_CALLTYPE IsDrawStarted() const throw() = 0;
617 
619  virtual IGL2DDrawStatsSP SDK_CALLTYPE GetDrawStats() const throw() = 0;
620 
629  virtual IGL2DTextureSP SDK_CALLTYPE CloneActiveFboBackBuffer() const throw() = 0;
630 
635  virtual SDKSize SDK_CALLTYPE GetSize() const throw() = 0;
636 
638  virtual SDKResult SDK_CALLTYPE ToggleAntiAliasing(
639  const bool& is_enabled) throw() = 0;
641  virtual bool SDK_CALLTYPE IsAntiAliasingEnabled() const throw() = 0;
642 
644  virtual SDKResult SDK_CALLTYPE Clear(const SDKColorF& clr) const throw() = 0;
645 
647  virtual SDKResult SDK_CALLTYPE PushObjectsTransformationMatrix(
648  const SDKMatrix3X2& matrix) throw() = 0;
650  virtual SDKResult SDK_CALLTYPE PopObjectsTransformationMatrix() throw() = 0;
652  virtual SDKResult SDK_CALLTYPE RemoveObjectsTransformationMatrixes() throw() = 0;
654  virtual SDKResult SDK_CALLTYPE GetObjectsTransformationMatrix(
655  SDKMatrix3X2& matrix) const throw() = 0;
656 
658  virtual SDKResult SDK_CALLTYPE SetCanvasTransformationMatrix(
659  const SDKMatrix3X2& matrix) throw() = 0;
661  virtual SDKResult SDK_CALLTYPE ApplyCanvasTransformationMatrix(
662  const SDKMatrix3X2& matrix) throw() = 0;
664  virtual SDKResult SDK_CALLTYPE GetCanvasTransformationMatrix(
665  SDKMatrix3X2& matrix) const throw() = 0;
666 
668  virtual SDKResult SDK_CALLTYPE RemoveTransformationMatrixes() throw() = 0;
669 
671  virtual SDKResult SDK_CALLTYPE GetTotalTransformationMatrix(
672  SDKMatrix3X2& matrix) const throw() = 0;
673 
675  virtual IGL2DClipRuleSP SDK_CALLTYPE CreateClipRule(
676  const GL2DClipRuleType& type) const throw() = 0;
677 
679  virtual SDKResult SDK_CALLTYPE SetClipRule(
680  const IGL2DClipRuleSP& rule) throw() = 0;
682  virtual IGL2DClipRuleSP SDK_CALLTYPE GetClipRule() const throw() = 0;
684  inline SDKResult SDK_CALLTYPE ResetClipRule()
685  { return SetClipRule(IGL2DClipRuleSP()); }
686 
688  virtual SDKAtomicRefCount SDK_CALLTYPE AddRef() const throw() = 0;
689  virtual SDKAtomicRefCount SDK_CALLTYPE Release() const throw() = 0;
690  virtual SDKResult SDK_CALLTYPE GetInterface(
691  const InterfaceId& id, void** obj_ptr) throw() = 0;
692 
693  SDK_IMPLEMENT_IID(IGL2DCanvas)
694  SDK_END_INTERFACE(IGL2DCanvas)
695 };
696 SDK_DECLARE_IID(IGL2DCanvas)
697 
700 {
701 public:
702  AutoLockUnlockCanvas(const IGL2DCanvasSP& canvas, const bool& release_ctx)
703  : m_canvas(canvas), m_locked(false)
704  {
705  if (m_canvas && !m_canvas->IsCanvasLocked())
706  m_locked = SDK_SUCCEEDED(m_canvas->LockCanvas(release_ctx));
707  }
708 
709  virtual ~AutoLockUnlockCanvas()
710  { if (m_locked) m_canvas->UnLockCanvas(); }
711 
712  inline bool IsLocked() const
713  { return m_canvas ? m_canvas->IsCanvasLocked() : false; }
714 
715 private:
716  const IGL2DCanvasSP m_canvas;
717  bool m_locked;
718 };
719 
722 {
723 public:
724  AutoStartFinishDraw(const IGL2DCanvasSP& canvas, const IGL2DTextureSP& tex)
725  : m_canvas(canvas), m_started(false), m_with_glfinish(true)
726  {
727  if (m_canvas && !m_canvas->IsDrawStarted())
728  m_started = SDK_SUCCEEDED(m_canvas->StartDraw(tex));
729  }
730  AutoStartFinishDraw(const IGL2DCanvasSP& canvas, const IGL2DTextureSP& tex,
731  const bool& with_glfinish)
732  : m_canvas(canvas), m_started(false), m_with_glfinish(with_glfinish)
733  {
734  if (m_canvas && !m_canvas->IsDrawStarted())
735  m_started = SDK_SUCCEEDED(m_canvas->StartDraw(tex));
736  }
737 
738  virtual ~AutoStartFinishDraw()
739  { if (m_started) m_canvas->FinishDraw(m_with_glfinish); }
740 
741  inline bool IsStarted() const
742  { return m_canvas ? m_canvas->IsDrawStarted() : false; }
743 
744 private:
745  const IGL2DCanvasSP m_canvas;
746  bool m_started;
747  bool m_with_glfinish;
748 };
749 
752 {
753 public:
754  AutoApplyObjectsMatrix(const IGL2DCanvasSP& canvas, const SDKMatrix3X2& m)
755  : m_canvas(canvas), m_applied(false)
756  {
757  if (canvas)
758  m_applied = SDK_SUCCEEDED(m_canvas->PushObjectsTransformationMatrix(m));
759  }
760 
761  virtual ~AutoApplyObjectsMatrix()
762  { if (m_applied) m_canvas->PopObjectsTransformationMatrix(); }
763 
764  inline bool IsApplied() const
765  { return m_applied; }
766 
767 private:
768  const IGL2DCanvasSP m_canvas;
769  bool m_applied;
770 };
771 
774 {
775 public:
776  AutoApplyCanvasClipRule(const IGL2DCanvasSP& canvas, const IGL2DClipRuleSP& rule)
777  : m_canvas(canvas), m_applied(false)
778  {
779  if (canvas)
780  m_applied = SDK_SUCCEEDED(m_canvas->SetClipRule(rule));
781  }
782 
783  virtual ~AutoApplyCanvasClipRule()
784  { if (m_applied) m_canvas->ResetClipRule(); }
785 
786  inline bool IsApplied() const
787  { return m_applied; }
788 
789 private:
790  const IGL2DCanvasSP m_canvas;
791  bool m_applied;
792 };
793 
794 SDK_GL2D_END_NAMESPACE
795 
796 #if defined (SDK_CC_GCC)
797 # pragma GCC diagnostic pop
798 #endif // SDK_CC_GCC
799 
800 #endif // SDK_GL2D_CANVAS_INTERFACE_H_
IGL2DCanvas::IsSameContextForDrawingAndResources
virtual bool SDK_CALLTYPE IsSameContextForDrawingAndResources() const =0
Returns true in case internal Resource GL context is same as internal GL Drawing context (Only one Op...
IGL2DCanvas::IsCanvasLocked
virtual bool SDK_CALLTYPE IsCanvasLocked() const =0
Checks, if canvas is locked.
SDKColorF
A RGBA color.
Definition: color_base_types.h:15
IGL2DCanvas::IsDrawStarted
virtual bool SDK_CALLTYPE IsDrawStarted() const =0
Checks, if draw in progress.
kGL2DCanvasPropertyID_CachedSymbolsCount
@ kGL2DCanvasPropertyID_CachedSymbolsCount
Definition: gl2d_canvas_interface.h:218
IGL2DCanvas::RemoveObjectsTransformationMatrixes
virtual SDKResult SDK_CALLTYPE RemoveObjectsTransformationMatrixes()=0
Removes all of applied objects transformation matrices.
kGL2DCreateCanvasSettingIDs_LogGlThreadUsage
@ kGL2DCreateCanvasSettingIDs_LogGlThreadUsage
Definition: gl2d_canvas_interface.h:410
IGL2DCanvas::CreateTexturesStorage
virtual SDKResult SDK_CALLTYPE CreateTexturesStorage(IGL2DTexturesStorageSP &textures_storage) const =0
Creates new textures storage.
kGL2DCanvasPropertyID_DefFontBorderWidth
@ kGL2DCanvasPropertyID_DefFontBorderWidth
Definition: gl2d_canvas_interface.h:101
kGL2DCanvasPropertyID_DefLineRoundAngle
@ kGL2DCanvasPropertyID_DefLineRoundAngle
Definition: gl2d_canvas_interface.h:118
GL2DCanvasPropertyIDs
GL2DCanvasPropertyIDs
Generic GL2D Canvas properties.
Definition: gl2d_canvas_interface.h:76
IGL2DCanvas::Dump
virtual void SDK_CALLTYPE Dump() const =0
Dumps given object.
base_types.h
SDK base types.
IGL2DCanvas::ResetClipRule
SDKResult SDK_CALLTYPE ResetClipRule()
Resets current clip rule.
Definition: gl2d_canvas_interface.h:684
IGL2DCanvas::ToggleAntiAliasing
virtual SDKResult SDK_CALLTYPE ToggleAntiAliasing(const bool &is_enabled)=0
Toggles anti-aliasing on/off.
kGL2DCanvasPropertyID_UseHighPriorityForGLThreads
@ kGL2DCanvasPropertyID_UseHighPriorityForGLThreads
Definition: gl2d_canvas_interface.h:210
IGL2DCanvas::GetStats
virtual IGL2DStatsSP SDK_CALLTYPE GetStats() const =0
Returns OpenGL stats (OpenGL usage statistics)
IGL2DCanvas::LockCanvas
virtual SDKResult SDK_CALLTYPE LockCanvas(const bool &release_internal_contexts)=0
Locks given GL2D canvas and suspends some or all of OpenGL operations Each lock operation should be f...
kGL2DCanvasPropertyID_MaxOzCoordinateValue
@ kGL2DCanvasPropertyID_MaxOzCoordinateValue
Definition: gl2d_canvas_interface.h:157
gl2d_font_interface.h
Provides with information about single registered font from GL2D fonts storage.
gl2d_draw_stats_interface.h
GL2D Draw Stats object, provides with statistics about last canvas draw operation (all of drawn objec...
kGL2DCreateCanvasSettingIDs_LogDirectory
@ kGL2DCreateCanvasSettingIDs_LogDirectory
Definition: gl2d_canvas_interface.h:383
AutoLockUnlockCanvas
Auto locks Canvas in ctor, unlocks in dtor.
Definition: gl2d_canvas_interface.h:699
IGL2DCanvas::SetClipRule
virtual SDKResult SDK_CALLTYPE SetClipRule(const IGL2DClipRuleSP &rule)=0
Sets new clip rule.
IGL2DCanvas::GetDrawStats
virtual IGL2DDrawStatsSP SDK_CALLTYPE GetDrawStats() const =0
Returns last draw operation statistics.
kGL2DCanvasPropertyID_PolygonsAsLines
@ kGL2DCanvasPropertyID_PolygonsAsLines
Definition: gl2d_canvas_interface.h:176
kGL2DCreateCanvasSettingIDs_ExtCreatedCtx
@ kGL2DCreateCanvasSettingIDs_ExtCreatedCtx
Definition: gl2d_canvas_interface.h:369
IGL2DCanvas::GetPlatformType
virtual GL2DPlatformType SDK_CALLTYPE GetPlatformType() const =0
Returns GL platform type (WGL/EGL/MESA/GLX/etc)
GL2DDeviceType
GL2DDeviceType
Device type (generic, iPhone, Samsung etc)
Definition: gl2d_canvas_interface.h:277
kGL2DWhiteClr
static const SDKColorF kGL2DWhiteClr
100% opaque white color
Definition: gl2d_canvas_interface.h:68
IGL2DCanvas::GetFontsStorage
virtual IGL2DFontsStorageSP SDK_CALLTYPE GetFontsStorage() const =0
Returns Fonts Storage.
GL2DPlatformType
GL2DPlatformType
OpenGL platform type.
Definition: gl2d_canvas_interface.h:234
gl2d_objects.h
Platform-dependent GL objects.
kGL2DCanvasPropertyID_CachedCharMapsCount
@ kGL2DCanvasPropertyID_CachedCharMapsCount
Definition: gl2d_canvas_interface.h:222
GL2DCacheType
GL2DCacheType
Cache type.
Definition: gl2d_canvas_interface.h:318
IGL2DCanvas::IsCanvasOperationSupported
bool IsCanvasOperationSupported(const GL2DCanvasOperationType &type) const
Checks, if given operation supported by canvas Same as IGL2DCaps::IsCanvasOperationSupported.
Definition: gl2d_canvas_interface.h:479
SDK_SUCCEEDED
#define SDK_SUCCEEDED(res)
Checks no error result.
Definition: sdk_results_enum.h:67
properties_interface.h
Object generic properties interface.
kGL2DCanvasPropertyID_AutoAcquireReleaseDrawLock
@ kGL2DCanvasPropertyID_AutoAcquireReleaseDrawLock
Definition: gl2d_canvas_interface.h:169
AutoStartFinishDraw
Auto starts draw in ctor, finishes in dtor.
Definition: gl2d_canvas_interface.h:721
kGL2DCanvasPropertyID_CurrentDrawCycleNum
@ kGL2DCanvasPropertyID_CurrentDrawCycleNum
Definition: gl2d_canvas_interface.h:161
IGL2DFactory
GL2D factory, which allows to create appropriate GL2D object.
Definition: gl2d_factory_interface.h:35
kGL2DCanvasPropertyID_AdjustTextPosition
@ kGL2DCanvasPropertyID_AdjustTextPosition
Definition: gl2d_canvas_interface.h:141
InterfaceId
Uuid InterfaceId
Definition of interface UUID.
Definition: sdk_uuid.h:45
kGL2DCreateCanvasSettingIDs_LogGlCalls
@ kGL2DCreateCanvasSettingIDs_LogGlCalls
Definition: gl2d_canvas_interface.h:396
AutoApplyObjectsMatrix
Applies objects transformation matrix on ctor, removes on dtor.
Definition: gl2d_canvas_interface.h:751
gl2d_clip_rule_interface.h
GL2D Clip Rule object.
kGL2DCanvasPropertyID_AdjustLatin1TextPosition
@ kGL2DCanvasPropertyID_AdjustLatin1TextPosition
Definition: gl2d_canvas_interface.h:147
kGL2DCanvasPropertyID_DefLineSmoothAngle
@ kGL2DCanvasPropertyID_DefLineSmoothAngle
Definition: gl2d_canvas_interface.h:110
IGL2DCanvas::GetObjectsTransformationMatrix
virtual SDKResult SDK_CALLTYPE GetObjectsTransformationMatrix(SDKMatrix3X2 &matrix) const =0
Returns current resulting object transformation matrix.
IGL2DCanvas::StartDraw
virtual SDKResult SDK_CALLTYPE StartDraw(const IGL2DTextureSP &texture)=0
Initiates new drawing process on texture. Texture can't be used during draw in progress In case conte...
IGL2DCanvas::SetCanvasTransformationMatrix
virtual SDKResult SDK_CALLTYPE SetCanvasTransformationMatrix(const SDKMatrix3X2 &matrix)=0
Sets new canvas transformation matrix, removes previous one.
kGL2DTransparentClr
static const SDKColorF kGL2DTransparentClr
100% transparent color
Definition: gl2d_canvas_interface.h:66
gl2d_caps_interface.h
GL2D Caps object, provides information about OpenGL/ES2 capabilities.
IGL2DCanvas::GetCanvasTransformationMatrix
virtual SDKResult SDK_CALLTYPE GetCanvasTransformationMatrix(SDKMatrix3X2 &matrix) const =0
Returns current canvas transformation matrix.
kGL2DCanvasPropertyID_CacheCleanupTimeout
@ kGL2DCanvasPropertyID_CacheCleanupTimeout
Definition: gl2d_canvas_interface.h:214
kGL2DCreateCanvasSettingIDs_LogGlTasks
@ kGL2DCreateCanvasSettingIDs_LogGlTasks
Definition: gl2d_canvas_interface.h:405
IGL2DCanvas::CreateClipRule
virtual IGL2DClipRuleSP SDK_CALLTYPE CreateClipRule(const GL2DClipRuleType &type) const =0
Creates new clip rule of appropriate type.
kGL2DCanvasPropertyID_RemoveClipRuleOnDrawFinished
@ kGL2DCanvasPropertyID_RemoveClipRuleOnDrawFinished
Definition: gl2d_canvas_interface.h:122
IGL2DCanvas::CloneActiveFboBackBuffer
virtual IGL2DTextureSP SDK_CALLTYPE CloneActiveFboBackBuffer() const =0
Copies currently active FBO back-buffer to appropriate texture Allows to make screenshots of active F...
IGL2DCanvas::ClearUpCache
virtual SDKResult SDK_CALLTYPE ClearUpCache(const SDKUInt32 &cache_id) const =0
Tries to remove unused entries from appropriate canvas cache(s) cache_id - Combination of GL2DCacheTy...
SDKResult
SDKInt32 SDKResult
Type of all error or return codes which SDK functions can end with.
Definition: sdk_results.h:17
GL2DClipRuleType
GL2DClipRuleType
Available clip rule types.
Definition: gl2d_clip_rule_interface.h:40
IGL2DCanvas::GetCanvasType
virtual GL2DCanvasType SDK_CALLTYPE GetCanvasType() const =0
Returns GL canvas type (OpenGL/OpenGL ES2/etc)
kGL2DCanvasPropertyID_Use32BitsTexturesForTexts
@ kGL2DCanvasPropertyID_Use32BitsTexturesForTexts
Definition: gl2d_canvas_interface.h:183
IGL2DCanvas::Clear
virtual SDKResult SDK_CALLTYPE Clear(const SDKColorF &clr) const =0
Clears whole canvas by specified color.
kGL2DCreateCanvasSettingIDs_GetGlProcAddr
@ kGL2DCreateCanvasSettingIDs_GetGlProcAddr
Definition: gl2d_canvas_interface.h:353
IGL2DCanvas::UnLockCanvas
virtual SDKResult SDK_CALLTYPE UnLockCanvas()=0
Unlocks previously locked canvas.
gl2d_stats_interface.h
GL2D Stats object, provides with statistics about OpenGL usage.
IGL2DCanvas::GetResourceGlContext
virtual SDKResult SDK_CALLTYPE GetResourceGlContext(GlCtx &resource_ctx) const =0
Returns internal Resource GL context data (Canvas should be locked with release_internal_contexts = t...
IGL2DCanvas::GetDrawLock
virtual IGL2DCanvasDrawLockSP SDK_CALLTYPE GetDrawLock() const =0
Returns Canvas Draw Lock instance.
kGL2DCreateCanvasSettingIDs_BreakOnGlError
@ kGL2DCreateCanvasSettingIDs_BreakOnGlError
Definition: gl2d_canvas_interface.h:392
GL2DCanvasType
GL2DCanvasType
OpenGL canvas type.
Definition: gl2d_canvas_interface.h:268
IGL2DCanvas::GetClipRule
virtual IGL2DClipRuleSP SDK_CALLTYPE GetClipRule() const =0
Returns current clip rule.
IGL2DCanvas::PopObjectsTransformationMatrix
virtual SDKResult SDK_CALLTYPE PopObjectsTransformationMatrix()=0
Removes latest objects transformation matrix from matrices stack.
kGL2DCreateCanvasSettingIDs_UseSameCtxForResourceAndDrawing
@ kGL2DCreateCanvasSettingIDs_UseSameCtxForResourceAndDrawing
Definition: gl2d_canvas_interface.h:379
kGL2DCanvasPropertyID_CachedGLBuffersCount
@ kGL2DCanvasPropertyID_CachedGLBuffersCount
Some private properties, mostly for unittests.
Definition: gl2d_canvas_interface.h:226
SDKPointF3D
Single 3D point.
Definition: geometry_base_types.h:101
color_base_types.h
Color base definitions.
kGL2DCreateCanvasSettingIDs_GlThread
@ kGL2DCreateCanvasSettingIDs_GlThread
Definition: gl2d_canvas_interface.h:347
IGL2DCanvas::DrawTexturesToTexture
virtual SDKResult SDK_CALLTYPE DrawTexturesToTexture(const IGL2DTextureSP &output_texture, const SDKMatrix3X2 &canvas_transformation, const SDKColorF &output_tex_clear_color, const IGL2DTexturesStorageSP &textures_to_render) const =0
Draws several textures to output texture. No need to call for StartDraw/FinishDraw for given operatio...
GL2DCreateCanvasSettingIDs
GL2DCreateCanvasSettingIDs
Available settings for new canvas.
Definition: gl2d_canvas_interface.h:338
kGL2DUndefinedPosition
static const SDKVertex3D kGL2DUndefinedPosition
Undefined position.
Definition: gl2d_canvas_interface.h:71
platform.h
Describes the platform constants.
kGL2DCanvasPropertyID_TextTexturesAtlasBlockSize
@ kGL2DCanvasPropertyID_TextTexturesAtlasBlockSize
Definition: gl2d_canvas_interface.h:189
kGL2DCanvasPropertyID_TextTexturesAtlasTextureHeight
@ kGL2DCanvasPropertyID_TextTexturesAtlasTextureHeight
Definition: gl2d_canvas_interface.h:201
IGL2DCanvas::RemoveTransformationMatrixes
virtual SDKResult SDK_CALLTYPE RemoveTransformationMatrixes()=0
Removes all of canvas/objects transformation matrixes.
kGL2DCanvasPropertyID_DefAntiAliasingWidth
@ kGL2DCanvasPropertyID_DefAntiAliasingWidth
Definition: gl2d_canvas_interface.h:95
kGL2DCanvasPropertyID_AllowExpandSymbolTexture
@ kGL2DCanvasPropertyID_AllowExpandSymbolTexture
Definition: gl2d_canvas_interface.h:206
IGL2DCanvas::GetTotalTransformationMatrix
virtual SDKResult SDK_CALLTYPE GetTotalTransformationMatrix(SDKMatrix3X2 &matrix) const =0
Returns total (objects + canvas) transformation matrix, applied to canvas.
IGL2DCanvas
GL2D Canvas to use to drawing NOTE! Create/Draw functionality was moved to appropriate GL2D Canvas Fu...
Definition: gl2d_canvas_interface.h:435
kGL2DCanvasPropertyID_TextsBlurring
@ kGL2DCanvasPropertyID_TextsBlurring
Definition: gl2d_canvas_interface.h:153
IGL2DCanvas::GetParent
virtual IGL2DFactorySP SDK_CALLTYPE GetParent() const =0
Returns parent factory object.
matrix_base_types.h
Matrix base definitions.
IGL2DCanvas::ReduceCacheSize
virtual SDKResult SDK_CALLTYPE ReduceCacheSize(const SDKUInt32 &cache_id, const SDKUInt64 &size_to_reduce) const =0
Tries to reduce appropriate cache size by removing unused items Only kGL2DGL2DCacheType_GLBuffers can...
AutoApplyCanvasClipRule
Applies canvas clip rule on ctor, removes on dtor.
Definition: gl2d_canvas_interface.h:773
IGL2DFontsStorage
GL2D fonts storage, which allows to register/unregister/manage fonts collection. Only registered font...
Definition: gl2d_fonts_storage_interface.h:36
geometry_base_types.h
Geometry base types.
IGL2DCanvas::ApplyCanvasTransformationMatrix
virtual SDKResult SDK_CALLTYPE ApplyCanvasTransformationMatrix(const SDKMatrix3X2 &matrix)=0
Applies new canvas transformation matrix to current canvas transformation.
IGL2DCanvas::GetDrawingGlContext
virtual SDKResult SDK_CALLTYPE GetDrawingGlContext(GlCtx &drawing_ctx) const =0
Returns internal Drawing GL context data (Canvas should be locked with release_internal_contexts = tr...
kGL2DCanvasPropertyID_RootShadersFolder
@ kGL2DCanvasPropertyID_RootShadersFolder
Definition: gl2d_canvas_interface.h:84
kGL2DCreateCanvasSettingIDs_CheckGlCalls
@ kGL2DCreateCanvasSettingIDs_CheckGlCalls
Definition: gl2d_canvas_interface.h:387
kGL2DCanvasPropertyID_TextTexturesAtlasTextureWidth
@ kGL2DCanvasPropertyID_TextTexturesAtlasTextureWidth
Definition: gl2d_canvas_interface.h:195
GL2DCanvasOperationType
GL2DCanvasOperationType
Available canvas operations.
Definition: gl2d_caps_interface.h:58
IGL2DCanvas::PushObjectsTransformationMatrix
virtual SDKResult SDK_CALLTYPE PushObjectsTransformationMatrix(const SDKMatrix3X2 &matrix)=0
Adds new objects transformation matrix to transformation matrices stack.
IGL2DCanvas::GetDeviceType
virtual GL2DDeviceType SDK_CALLTYPE GetDeviceType() const =0
Returns device type (Generic/iPhone/whatever)
IGL2DCanvas::AddRef
virtual SDKAtomicRefCount SDK_CALLTYPE AddRef() const =0
ISDKComponent own declaration.
kGL2DCanvasDefTextBorderWidth
static const float kGL2DCanvasDefTextBorderWidth
Default text border width for bordered texts.
Definition: gl2d_canvas_interface.h:429
IGL2DCanvas::EnsureGLDataLoaded
virtual SDKResult SDK_CALLTYPE EnsureGLDataLoaded() const =0
Some devices have issues while working with separate Resource/Drawing contexts, in case GL object is ...
IGL2DCanvas::IsSeparateContextsForDrawingAndResources
bool SDK_CALLTYPE IsSeparateContextsForDrawingAndResources() const
Returns true in case internal Resource GL context is not same as internal Drawing GL context.
Definition: gl2d_canvas_interface.h:553
IGL2DCanvas::GetSize
virtual SDKSize SDK_CALLTYPE GetSize() const =0
Returns current canvas size Draw should be in progress, otherwise canvas size is zero Returns either ...
kGL2DCanvasPropertyID_DontCreateNonRenderableObjects
@ kGL2DCanvasPropertyID_DontCreateNonRenderableObjects
Definition: gl2d_canvas_interface.h:127
IGL2DCanvas::ForceUnlockAndResume
virtual SDKResult SDK_CALLTYPE ForceUnlockAndResume()=0
NL-1671: retained as a no-op vtable slot for ABI compatibility (was a Fix-4 recovery entry point; rec...
kGL2DCreateCanvasSettingIDs_LogGlCallPerf
@ kGL2DCreateCanvasSettingIDs_LogGlCallPerf
Definition: gl2d_canvas_interface.h:400
sdk_results_enum.h
SDK return values synonyms in the sdk namespace.
kGL2DCanvasPropertyID_AllowCreateCompatibleObject
@ kGL2DCanvasPropertyID_AllowCreateCompatibleObject
Definition: gl2d_canvas_interface.h:134
SDK_MAX_FLOAT
static const float SDK_MAX_FLOAT
Max limit of float.
Definition: platform.h:197
SDKSize
SizeUI.
Definition: geometry_base_types.h:1235
FWD_DECL_INTERFACE
FWD_DECL_INTERFACE(ILWEParserWrapper)
Provides a wrapper around the message parser to get, add or remove the.
IGL2DCanvas::GetCaps
virtual IGL2DCapsSP SDK_CALLTYPE GetCaps() const =0
Returns OpenGL caps (OpenGL capabilities info)
GlCtx
Platform-specific OpenGL/ES2 context.
Definition: gl2d_objects.h:170
IGL2DCanvas::IsAntiAliasingEnabled
virtual bool SDK_CALLTYPE IsAntiAliasingEnabled() const =0
Returns current state of anti-aliasing flag (enabled/disabled)