GLG 3.5 Release: New
Features and Enhancements
The major new features of the new 3.5 release of the GLG Toolkit
- Integrated data filtering of
real-time chart data for optimizing performance of
charts with large data sets.
- An ability to supply custom
data filters for real-time charts.
- New plot types that
- Auto-scaling of Y axes
and plots in a real-time chart based on the incoming data range.
- Ability to define Plot-Axis
association in a real-time chart with multiple Y axes.
- Access to data samples in a Plot's Data History Buffer makes
it possible to delete
individual plot points, as well as add markers to a plot's points
with the mouse.
- Integrated action objects
may be attached to objects at design time to execute custom
commands on mouse events.
- Ability to define complex action activation conditions, such
as a specified mouse button or a pressed Control key.
- Constraints tracing option
in the Graphics Builder to assist troubleshooting constraints
defined in the drawing.
- Updated OpenGL driver
with support for core profile
in OpenGL versions 3.x and 4.x.
- Support for the PNG image
format with or without an alpha-channel.
- New Compare and Bitmask
transformations were added to facilitate creating
elaborate conditions to control dynamic changes.
- Z coordinate support in the GIS Object to enable visualizing of satellite orbits.
- Many other new features, improvements and bug fixes.
New Real-Time Chart
| Real-Time Chart with Markers
and Data Filtering
Click on the image to run Online Demo
Real-Time Plot Types With Markers
New plot types that render markers
were added to the real-time chart: MARKERS, LINE & MARKERS, STEP
& MARKERS. A plot may have a marker drawn for all its points; a
marker may also be used to selectively annotate some data samples,
in which case the marker's Visibility
resource can be used for supplying marker visibility for each data
sample. For plots with a marker, the marker will also appear
in the chart legend.
A new coding example that demonstrates how to activate or deactivate
a marker for a data sample selected with the mouse (on Double-click)
in a real-time chart.
Filtering For Handling Large Data Sets
Added chart data filtering
to optimize performance of charts with a large number of data points. A data filter is
activated by setting the FilterType
attribute of a plot. Several filter types are available, as well as
a possibility to use a custom filter provided by an application.
attribute controls a pixel interval used for filtering: multiple
data points within each pixel interval will be compressed to either
one or two points depending on the filter type. The filter handling
logic ensures that the filtering is "stable" and does not change the
shape of a plot when new data are added or when the chart is
Several filter types are available: MIN_MAX, AVERAGE, DISCARD and
If markers are used to annotate some points of interest in a plot,
attribute may be set to OFF to disable filtering for points with
markers, to make sure that the special points with markers are
always displayed and are not filtered out.
will draw the minimum and maximum data points detected in the
will draw a single data point representing an
averaged value and an averaged time stamp of all points in the
will keep the first data point and will discard the rest
of the points in the interval.
allows using a custom filter provided by an
application. A custom filter is set by using GlgSetChartFilter() method,
which sets a custom function that will be invoked for every data
point that needs to be filtered.
Based on Incoming Data
A new AutoScale
attribute was added to the Chart
object. When AutoScale is
ON, the chart will automatically adjust the ranges of its plots and
the associated axes when the supplied data get out of a plot's
attribute of a Plot object
controls the amount of the range increase when the plot's new data
go out of range in a chart with AutoScale=ON.
positive value of AutoScaleDelta
defines an absolute increment by which the high or low range of the
plot will be changed. More than one increment may be used if
necessary. A negative value may be used to supply an increment
relative to the initial range of the plot. For example, a value of -0.1 defines an relative
increment equal to 10% of the initial plot range.
To facilitate manual and auto-rescaling of charts with multiple Y
axes, a new LinkedYAxis
attribute was added to the Plot
and LevelLine objects to
associate plot range with the range of the linked Y axis. The LinkedYAxis attribute may be
set in the Graphics Builder at design time by selecting a linked
axis from a list of Y axes.
When a plot is linked with an axis, the range of the plot and the
axis can be changed in one place, either for the plot or the axis.
If several plots are linked with the same axis, changing the range
in any plot or axis affects all linked plots.
to Data Samples in a Plot's Data History Buffer
The Array attribute of a
plot in a real-time chart provides direct access to the plot's
history buffer. The history buffer is a list object that holds the
plot's data samples. GLG API methods may be used to traverse the
list to access properties of individual data samples. Individual
data samples may also be deleted from the plot if necessary. A new
RTChartMarkerFeedback programming example demonstrates how to use
the new functionality to add or delete markers from the data samples
selected with the mouse.
New time axis types were added to facilitate display of either local or UTC time in real-time
A new Enabled attribute
was added to both plots and levels of a chart. The attribute can be
used to switch a plot ON or OFF without destroying the data
accumulated in the data history buffer.
A new option to draw level lines in the background or foreground of
the plot lines was added to a chart's DrawOrder attribute.
Handling of double anti-aliasing for plots, ticks and grid lines was
added to the Java version of the chart to achieve smoother
Integrated Actions and Custom
A new Action object was introduced to better handle mouse interaction
with objects in the drawing. The Action
object may be attached to a graphical object, such as polygon or
text, to define actions to be executed when the user clicks on an
object or moves a mouse over it. An action can be used to
define a custom command,
such as loading another drawing, writing a value to the process
controller, or performing an application-defined custom action.
| On/Off Light:
Set/Reset Data Action
The Action object has
properties that define the type of action to perform and the type of
event that triggers the action. The action types include generating
a custom event, executing a custom command or changing the state of
the specified resource in the drawing to provide visual feedback,
such as highlighting an object on MouseClick or MouseOver. The image
on the right shows an example of using Actions attached to buttons
to turn the light ON or OFF, with no programming code required.
An action can be triggered by a mouse click with the specified mouse
button, making it possible to attach several actions that are activated by different mouse
buttons. An action attached to an input widget can be
triggered by the specified input action. An optional state of the Control key may also be
specified in case the action should be activated only when it is
"armed" by pressing the Control
The Enabled property of the
Action object allows the
application to dynamically enable or disable the action as needed. A
boolean transformation may be added to the Enabled property to
define elaborate action activation conditions depending on the state
of other resources in the drawing.
A Command action allows
the user to define custom commands with a predefined set of
properties. Several predefined
command types (GoTo, PopupDialog, WriteValue, etc.) are
available, and more custom command types may be added by configuring
the Graphics Builder and the HMI Configurator.
Each command has a set of properties that may be used by an
application to handle the command at run time. For example, the GoTo command has a DrawingFile property that
specifies the drawing file to be loaded.
Object, Action menu option
in the GLG Builder may be used to attach various actions to the
selected object. The Status Panel
contains a new Action
button that may be used to edit actions attached to the selected
In the new version, an Action
object is also used for adding object tooltips. The Object.Tooltip, Add Tooltip
menu option adds a Tooltip
action to the selected object. The new tooltip action has the Enabled property that may be
used to enable or disable the tooltip.
The Action object provides
a better mechanism for handling Custom
Events, as well as MouseOver
highlighting actions, which in the previous releases were added to
an object as special resource names. While the old method is
supported for backward compatibility, the integrated Action object provides a much finer control over the events
and allows a user to define custom commands with a predefined set of
properties, without the tedious editing of the object's Custom Properties required in
the previous versions of the Toolkit. The use of a dedicated Action object instead of named
resources simplifies management of resource hierarchies, as the Action object does not depend
on the setting of the HasResources
flag. It also increases the speed
of event processing for drawings with large number of objects.
Custom Property Sets
To simplify a process of adding lists of custom properties to
multiple objects, predefined lists can be assembled and stored in a
template drawing for reuse. The Add Custom Property, Add Predefined Set menu option
may then be used to select and add a predefined set of properties to
an object. Several predefined custom property sets are provided, and
additional sets may be added by configuring the Graphics Builder and
the HMI Configurator.
In the previous versions, the custom properties had to be added one
by one to form a property set that could be copied. The new feature
allows adding predefined custom property sets with a single mouse
click. After adding a custom property set, it may be edited to add
or remove individual custom properties.
New OpenGL Driver
for Core Profile in OpenGL v. 3.x and 4.x
Support for the core profile of the OpenGL versions 3.x and 4.x was
added the Toolkit's OpenGL Driver. The core profile uses VBO-based
retained mode and does not provide immediate mode rendering. The
retained rendering mode may provide performance improvements for
drawings containing a large number of objects with static geometry.
The retained mode may also significantly increase update speed of drawings with background images
and text objects by storing cached textures on the graphics
card. The retained mode is automatically activated when an OpenGL
version 3.0 or higher is requested.
global configuration resource may be used to request a particular
version of the OpenGL for the hardware-based version of the GLG
OpenGL driver. For example, it may be set to a value of 330 to
request OpenGL version 3.3. Alternatively, the GLG_OPENGL_VERSION environment
variable and the -glg-opengl-version
command-line option may be used to specify a desired OpenGL
version. While the core profile support could be also
activated for the software-based OpenGL driver, it would not yield
any performance improvements due to the lack of hardware
acceleration in the software-based driver (in fact, it would slow
The value of GlgOpenGLVersion
is subject to the following thresholds:
With the OpenGL version greater or equal to 3.0, there is no
limitation on the maximum width of thick lines. In the prior
versions, the maximum line width limited (usually to 10 pixels
- 100 (OpenGL version 1.0), uses glVertex()
- 110 (OpenGL version 1.1), uses vertex arrays
- 300 (OpenGL version 3.0), uses shaders, vertex arrays, as well
as textures for text glyphs and images
- 330 (OpenGL version 3.3), uses shaders, VBOs, as well as
textures for text glyphs and images.
The new GLG OpenGL driver also supports EGL (Embedded OpenGL).
However, the EGL supplied by ARM devices, such as Raspberry PI and
BeagleBone boards, does not yet support EGL under X Windows. This
precludes from using hardware-accelerated GLG OpenGL drivers on this
devices. The software-based OpenGL or GDI drivers may still be used
on these boards.
Features of the OpenGL Driver
attribute, which previously was available only for polygons, was
added to Marker objects to improve rendering of markers in OpenGL,
as well as to allow precise control over rendering.
The lighting model is now applied to images if the OpenGL driver is
The performance and quality of rendering of rotated text on Windows
was improved in the updated OpenGL driver.
A new option for tracing
attribute constraints was added in the Enterprise Edition
of the GLG Builder. To trace constraints for a given attribute,
mark the attribute as Mark0
and activate tracing via
the Options, Selection Options,
Trace Attribute Constraints for Mark0 menu option.
To find objects in the drawing that have attributes constrained
to the attribute marked with Mark0,
select each object with the mouse. If the selected object has
attributes that are constrained to the marked attribute, the Status Panel fields that
display the object's Name
and Type are highlighted
in red. If the object has a geometric transformation, an action or
custom data whose attributes are constrained to the marked
attribute, the corresponding buttons in the Status Panel will also be
highlighted. To narrow the search, follow the highlighted items
and their properties.
The attributes constrained to the marked attribute will also be
highlighted with a red outline in the property dialogs, such as Object Properties, Object Dynamics,
Attribute Object and others. If the attribute itself is
constrained, a solid outline is used. If an attribute itself is
not constrained, but has a transformation whose parameters are
constrained, a dashed outline is used.
Stars are used to annotate constrained items in list dialogs, such
as Custom Properties or
Object Dynamics List. If
an item is constrained, it is annotated with two stars. If the
item itself is not constrained, but has a transformation whose
parameters are constrained, it is annotated with one star.
In drawings with a large number of objects, group multiple
objects in a temporary group and check if Name and Type field in the Status Panel are highlighted.
New Transformation Types
A new Compare
transformation makes it easier to compare
values of two variables and use the result of the
comparison to drive dynamics. The result of the comparison may be
used as an input to the Boolean
transformation by attaching the Compare
transformation to parameters of the Boolean transformation, making it possible to
assemble elaborate conditions that control dynamic changes to
graphical objects. The first attribute of the transformation defines
a comparison operator, such as Equal,
Not Equal, Greater, Greater or Equal, etc.
A new Bitmask
transformation converts the state of several boolean input variables
into a numerical value by interpreting the inputs as bits of the
output value. For example, the following combination of inputs will
generate 10 as the output value:
Bit 3 = 1
Bit 2 = 0
Bit 1 = 1
Bit 0 = 0
The Bitmask transformation
may be attached to the Index
attribute of a list trasformation to change color or some other attribute of an object depending on the state of several input
A UTC time display option
was added to the Time Format
and Time Display
transformations to display either local or UTC time.
Added new Function options
for a Boolean
transformation to provide a complete coverage of the most common
boolean combinations of three input parameters.
New Tag Features
A new TagEnabled attribute
of the Tag object allows
an application to temporarily
disable data updates of the tag. If the tag is disabled by
setting its TagEnabled
attribute value to NO, the tag value will not be updated by the SetTag API method, while other
tag objects with the same tag source will still be updated. When a
tag is attached to an input object, such as a text input that
displays a numerical value, the new attribute can be used to
temporarily disable a tag at run time while the user enters a new
A new TagAccessType
attribute was added to the Tag
object to allow an application to differentiate
between Input and Output tags. Input tags are updated with
data from a process database. Output
tags may be used to define a tag for writing a new value back to the
database. Output tags are
not updated by the SetTag
API methods. A tag may also have an Init access type to indicate that the tag is
updated with data only once, on the initial appearance.
Added Data Browser options
in the GLG Editors to browse either Tag Names or Tag
Sources. The option controls how the output of the Data Browser is used: as a
source or a name of a tag. The BrowseTagSource
configuration file option has also been added to control the default
Support of the PNG image format was added to all supported GLG
platforms and deployment options. PNG images with an alpha channel
are also supported in Java, .NET, as well as C/C++/ActiveX in the
A SaveImage Format option
was added to the GLG Editors to allow the user to save images in either JPEG or PNG
formats. A SaveImageFormat
configuration file option controls the default format setting.
The PNG image format is also supported by the GlgSaveImage() API method via
the GLG_PNG value of its format parameter.
The -lpng option has to be
added to the makefiles imported from the older GLG versions to link
with the PNG library.
New GLG API Methods
Two new API methods were added to the Standard API to allow
applications to take advantage of the new features of the real-time
may be used to associate a plot with a Y axis of a chart.
may be used to attach custom data filters to individual Plot
objects of a chart.
New Map Server Features
The support for the PNG format has been added to the GLG Map
Server. PNG images can be used as input images and tiles for
image layers, as well as icons for vector layers.
PNG images with an alpha channel
are also supported. Alpha-channel allows defining transparency on
per pixel basis, which can be used to display weather and cloud
overlays on top of a map. PNG images with an alpha channel can also
be used as icons with transparent background, without a need to
define a transparent color in the layer's LIF file.
Changed handling of the Z coordinate for objects places inside the GIS Object. Previously,
the X and Y coordinates of objects inside the GIS Object were treated as
longitude and latitude to allow positioning objects in GIS
coordinates, and the Z coordinate was ignored. In the new release,
the Z coordinate is interpreted as an elevation above the Earth
surface in meters, which makes it possible to display satellite orbits on top of the
globe in the orthographic projection, as shown
in the picture at the top of the page. Click here to run a demo.
Clipping logic of the orthographic projection was changed to allow
an application to display only a part of the globe when the GIS Object is partially
clipped, which makes it possible to create zoomed-in views on an area in
orthographic projection that shows the horizon, with a
rocket trajectory interposed on top of the map, as shown in the picture on the right.
Click here to run a demo.
A new BACKGROUND layer type was added to the map server to define a
gradient for the area outside of the globe in the orthographic
projection. In the picture on the right, the BACKGROUND layer is
used to render the sky above the horizon line.
Features and Changes
In the Input callback, a
new message with Format=UpdateDrawing
is now generated for actions that modify a value of a resource in
the drawing. If the resource is constrained, the message can be
handled in the Input callback to redraw sibling viewports that are
affected by the change.
Added an escape mechanism
for specifying native
platform-specific formats for date, time and number
formatting in the GLG Builder. The platform-specific formats may be
specified by surrounding them with HTML-style brackets:
where platform may be one of the following: java, c#, c_unix or c_windows. One or more platform-specific
formats may be specified before the generic platform-independent
format that will be used for the remaining platforms. The following
format uses different native format specifications for C#, Java and
Added the OwnsInputCB attribute to the viewport
object to fine-tune the way the input callback is invoked for the
input events in the viewport. If an input callback was attached to
an ancestor viewport, setting OwnsInputCB=YES
causes the input callback to be invoked with the viewport as
a parameter, instead of the ancestor viewport to which the input
callback is attached. This makes it possible to create better
encapsulated drawings containing command actions, such as displaying
popup dialogs. These commands contain resource path to the dialog to
be shown, and with the OwnsInputCB
flag set, these resource path may be specified relatively to the
drawing itself, regardless of the path to the subwindow in which a
drawing may be displayed in an elaborate application, as shown in
the SCADA Viewer demo. Previously, to achive the same effect, the
same input callback had to be added to the viewport of a drawing
when the drawing was loaded in the subdrawing.
Added the -glg-debug-opengl
command-line option to display extended information about the OpenGL
driver, while the -verbose
option displays general information.
Added a verification of the VIEWPORT
object type in the GlgAddCallback()
method in Java/C#).
On the initial display of a drawing in the Java version of the
Toolkit, the focus is now set to the top-level viewport to properly
handle armed buttons and armed custom events.
Added support for the -glg-disable-timers
command-line option and the GLG_DISABLE_TIMERS
environment variable. The new options may be used to disable all GLG
timers in a drawing for debugging.
Added an icon in the Object
Properties and Dynamics
Properties dialogs for switching
display between Object
Properties and Public
Properties. The icon becomes enabled if an object
has public properties defined.
Increased the default number of
colors in the color palette. The number of colors may be
adjusted via the GlgDefaultColorFactor
parameter in the glg_config
An error message for unnamed bound objects is now generated when a
subdrawing's drawing is loaded or reset via File, Reset. This makes it easier to find unnamed bound
objects at the design time. Previously, the error message
was generated only when the subdrawing was used in another drawing.
Added the "\n [...]" suffix
multi-line lines displayed in a single-line text field to indicate
that the text field is read-only and the ellipsis button may be used
to popup an editing dialog with a text edit field.
Added Set Focus and Reset Focus options to the Traverse menu of the HMI
Configurator to enable users to edit objects inside a
viewport. Setting focus inside the viewport of the Real-Time Chart widget allows
the user to select the chart object for editing via the Properties dialog. In the
previous versions, the chart object in the HMI Configurator was
accessible only via the Resource
Enabled inheriting anti-aliasing and shading attributes when editing
polygon objects in the GLG Builder.
Enabled Delete button
accelerator for the Cut
action on Windows.
Improved automatic adjustment of the SnapTo option after zooming down into the GIS
object and then returning back up.
Added the -widget-editing-mode
command-line option and the
GLG_WIDGET_EDITING_MODE environment variable that may be
used to start the GLG Builder in the widget editing mode. In this
mode, a widget may be loaded from a widget palette by using Ctrl-click on a widget, and
then saved back into its original location using the File, Save menu option.
However, care should be exercised, since it will permanently
overwrite the original widget.
Allowed GIS coordinate conversion in GlgGISConvert() even if the GIS object is clipped
out or disabled.
Fixed an error when adding a plot to a chart object after deleting
Enhanced handling of the custom MouseClick
event for a case when the viewport containing the object that
generated the event was reset or destroyed as a result of the event
processing in the Input
Improved repainting of light-weight GLG Java Beans in Java/Swing
environment in case when they had other light-weight components
intersecting the beans.
Fixed handling of subdrawings with relative path in Java in a case
when they were used in an applet running locally using the
file-based URL for the main drawing.
Fixed multiple choice list selection in C# version of the GLG.
Fixed rendering of a chart legend containing lines with no labels,
improved layout of legends containing very thick lines.
Fixed handling of the custom MouseOver
event and MouseOver
highlight connected to intersecting objects.
Fixed reset of a custom MouseClick
event when a different mouse button was pressed.
Fixed text rendering in OpenGL on some ATI cards: added a workaround
to prevent the text being flipped in the vertical direction due to
the ATI driver bug.
Fixed handling of the UTF Flag
in string concatenation transformations that had strings with
different settings of the flag.
Fixed redrawing of menu items in the Attribute panel on Windows for TextDirection, Anchor and other
attributes that use menus. This fixes drawing artifacts that
appeared when menus ware changed.
Fixed native slider interaction handler on the C# platform to
eliminate error messages when scrolling out-of-range.
Fixed time grid alignment for real-time charts with relative time