![]() |
NAVTOR SDK
v.3.0
Software Development Kit for fast and efficient development of ECDIS, ECS and generic marine applications
|
GL2D Canvas to use to drawing. More...
#include <base/inc/platform.h>#include <base/inc/base_types.h>#include <base/inc/sdk_component_base.h>#include <base/inc/sdk_results_enum.h>#include <base/inc/geometry/geometry_base_types.h>#include <base/inc/color/color_base_types.h>#include <base/inc/math/matrix_base_types.h>#include <base/inc/interfaces/properties/properties_interface.h>#include <visualizationlayer/inc/vis_const.h>#include "./gl2d_canvas_func/gl2d_canvas_utils_interface.h"#include "./gl2d_canvas_func/gl2d_canvas_projection_func_interface.h"#include "./gl2d_canvas_func/gl2d_canvas_palette_func_interface.h"#include "./gl2d_canvas_func/gl2d_canvas_radar_image_func_interface.h"#include "./gl2d_canvas_func/gl2d_canvas_filled_circles_func_interface.h"#include "./gl2d_canvas_func/gl2d_canvas_pattern_func_interface.h"#include "./gl2d_canvas_func/gl2d_canvas_textbox_func_interface.h"#include "./gl2d_canvas_func/gl2d_canvas_bordered_latin1_text_func_interface.h"#include "./gl2d_canvas_func/gl2d_canvas_latin1_text_func_interface.h"#include "./gl2d_canvas_func/gl2d_canvas_text_func_interface.h"#include "./gl2d_canvas_func/gl2d_canvas_line_mark_func_interface.h"#include "./gl2d_canvas_func/gl2d_canvas_sprites_func_interface.h"#include "./gl2d_canvas_func/gl2d_canvas_textured_line_func_interface.h"#include "./gl2d_canvas_func/gl2d_canvas_texture_func_interface.h"#include "./gl2d_canvas_func/gl2d_canvas_light_source_func_interface.h"#include "./gl2d_canvas_func/gl2d_canvas_mesh_func_interface.h"#include "./gl2d_canvas_func/gl2d_canvas_line_func_interface.h"#include "gl2d_caps_interface.h"#include "gl2d_stats_interface.h"#include "gl2d_draw_stats_interface.h"#include "gl2d_textures_storage_interface.h"#include "gl2d_font_interface.h"#include "gl2d_clip_rule_interface.h"#include "gl2d_thread_interface.h"#include "gl2d_objects.h"Go to the source code of this file.
Data Structures | |
| class | IGL2DCanvas |
| GL2D Canvas to use to drawing NOTE! Create/Draw functionality was moved to appropriate GL2D Canvas Func interface. More... | |
| class | AutoLockUnlockCanvas |
| Auto locks Canvas in ctor, unlocks in dtor. More... | |
| class | AutoStartFinishDraw |
| Auto starts draw in ctor, finishes in dtor. More... | |
| class | AutoApplyObjectsMatrix |
| Applies objects transformation matrix on ctor, removes on dtor. More... | |
| class | AutoApplyCanvasClipRule |
| Applies canvas clip rule on ctor, removes on dtor. More... | |
Variables | |
| static const SDKColorF | kGL2DTransparentClr = { 0.0f, 0.0f, 0.0f, 0.0f } |
| 100% transparent color | |
| static const SDKColorF | kGL2DWhiteClr = { 1.0f, 1.0f, 1.0f, 1.0f } |
| 100% opaque white color | |
| static const SDKVertex3D | kGL2DUndefinedPosition |
| Undefined position. | |
| static const float | kGL2DCanvasDefTextBorderWidth = 2.0f |
| Default text border width for bordered texts. | |
GL2D Canvas to use to drawing.
Copyright © The Navtor SDK 2011-2016. All Rights Reserved.
Generic GL2D Canvas properties.
| Enumerator | |
|---|---|
| kGL2DCanvasPropertyID_RootShadersFolder | Path to root shaders folder Given folder should contain sub-folders with shader programs/routines for OpenGL/ES2 named "gl", "gles" and "common" IN CASE PATH IS RELATIVE - IT SHOULD BE RELATIVE TO MODULE LOCATION, NOT TO EXECUTABLE LOCATION kSDKAnyType_SDKStringPtr Monitor DPI value (used for font rendering) Changing of DPI does not affects already created objects, only newly created objects will use new DPI value kSDKAnyType_Uint32 |
| kGL2DCanvasPropertyID_DefAntiAliasingWidth | Default additional width to lines for anti-aliasing effect Each side of line will be expanded by half of given value in pixels kSDKAnyType_Float Default font border width for bordered texts, in pixels Changing of border size does not affects already created objects, only newly created objects will use new border width value kSDKAnyType_Float |
| kGL2DCanvasPropertyID_DefFontBorderWidth | Default smooth angle value for lines with pattern, in degrees, 0 - 180 In case line has pattern (dash/texture), smooth angle criteria can be specified, in case line joins angle is less than defined value, pattern will be used instead of any specific connection lines Changing of smooth angle does not affects already created objects, only newly created objects will use new value kSDKAnyType_Float |
| kGL2DCanvasPropertyID_DefLineSmoothAngle | Default round angle value for textured lines, in degrees, 0 - 180 In case join angle between two line segments <= given angle - round join will be used, if join angle > given angle - butt join will be used Changing of round angle does not affects already created objects, only newly created objects will use new value kSDKAnyType_Float |
| kGL2DCanvasPropertyID_DefLineRoundAngle | Removes applied clip rule when draw is finished (at FinishDraw call) kSDKAnyType_Bool |
| kGL2DCanvasPropertyID_RemoveClipRuleOnDrawFinished | Do not create objects (meshes/lines/etc) which can't be rendered (See IGL2DCaps::IsCanvasOperationSupported method) kSDKAnyType_Bool |
| kGL2DCanvasPropertyID_DontCreateNonRenderableObjects | Allows to create compatible object, in case original object can't be rendered (for example Fash dash line instead of Rougier dash line, in case Rougier dash line rendering is not supported) (See IGL2DCaps::IsCanvasOperationSupported method) kSDKAnyType_Bool |
| kGL2DCanvasPropertyID_AllowCreateCompatibleObject | Allows to adjust text position during text rendering (Rounds fractional text position coordinates to integer one) Given flag is for Simple/Bordered/Latin1 bordered/Texts collection texts, for Latin1 texts see kGL2DCanvasPropertyID_AdjustLatin1TextPosition below kSDKAnyType_Bool |
| kGL2DCanvasPropertyID_AdjustTextPosition | Allows to adjust Latin1 text position during text rendering (Rounds fractional text position coordinates to integer one) Given flag is for Latin1 texts rendering only kSDKAnyType_Bool |
| kGL2DCanvasPropertyID_AdjustLatin1TextPosition | Allows to use filtering (blurring) for texts. If true - texts can be blurred, but always have fixed position If false - texts looks sharp, but will jitter due of their position kSDKAnyType_Bool |
| kGL2DCanvasPropertyID_TextsBlurring | Max Oz coordinate value (depth/height) kSDKAnyType_Uint32 |
| kGL2DCanvasPropertyID_MaxOzCoordinateValue | Current draw cycle number (Number of calls to StartDraw method) kSDKAnyType_Uint64, Get only |
| kGL2DCanvasPropertyID_CurrentDrawCycleNum | Auto acquire draw lock in case StartDraw call has passed, auto release previously acquired draw lock on FinishDraw call If one thread started rendering by calling StartDraw another one thread will hang on it's call to StartDraw till previously started rendering will not be finished kSDKAnyType_Bool, false by default |
| kGL2DCanvasPropertyID_AutoAcquireReleaseDrawLock | Following properties mostly for debugging purposes and should not be changed in most cases |
| kGL2DCanvasPropertyID_PolygonsAsLines | Present polygons as lines only (debug mode, OpenGL only) kSDKAnyType_Bool Use 32 bits full colored RGBA textures instead of 8 bits for internal text texture Only for debug/testing purposes, don't change this property, otherwise each text object will use additional video-memory without any profit kSDKAnyType_Bool |
| kGL2DCanvasPropertyID_Use32BitsTexturesForTexts | Text textures atlas block size, in pixels, same for width and height 16 pixels by default, should not be changed in most of cases Affects only newsly created text collections kSDKAnyType_Uint32 |
| kGL2DCanvasPropertyID_TextTexturesAtlasBlockSize | Text textures atlas texture width, in pixels 2048 pixels by default, should not be changed in most of cases Affects only newsly created text collections kSDKAnyType_Uint32 |
| kGL2DCanvasPropertyID_TextTexturesAtlasTextureWidth | Text textures atlas texture height, in pixels 1024 pixels by default, should not be changed in most of cases Affects only newsly created text collections kSDKAnyType_Uint32 |
| kGL2DCanvasPropertyID_TextTexturesAtlasTextureHeight | Allows to expand single text symbol texture with empty strides (one empty stride for top and bottom of each symbol textures) kSDKAnyType_Bool |
| kGL2DCanvasPropertyID_AllowExpandSymbolTexture | Use higher priority for OpenGL thread(s) kSDKAnyType_Bool |
| kGL2DCanvasPropertyID_UseHighPriorityForGLThreads | Default timeout to clean up unused items from canvas cache(s) kSDKAnyType_Uint32, in seconds |
| kGL2DCanvasPropertyID_CacheCleanupTimeout | Returns total number of cached symbol textures kSDKAnyType_Uint32, Get only |
| kGL2DCanvasPropertyID_CachedSymbolsCount | Returns total number of cached character map textures kSDKAnyType_Uint32, Get only |
| kGL2DCanvasPropertyID_CachedCharMapsCount | Returns total number of cached GL buffers (VBO), which are not in use kSDKAnyType_Uint32, Get only |
| kGL2DCanvasPropertyID_CachedGLBuffersCount | Some private properties, mostly for unittests. |
Available settings for new canvas.