F-35 Lightning II
The major new features of the new 3.4 release of the GLG Toolkit include:
A new C# GLG Class Library is now
available for developing GLG .NET
applications. Previously, the GLG ActiveX Control was used in
the .NET environment, while the new C# DLL can now be used for a native
.NET application development.
The ActiveX Control is still provided as an option for applications that require OpenGL hardware accelerated graphics to render complex 3D drawings.
A C# GLG User Control component provides a tight integration with the Visual Studio. For flexibility, both the native C# events, listeners and overridable callbacks are supported for handling GLG events. Numerous demos and examples are also included with the release.
The C# version of the run-time library provides support for balloon tooltips, which can be activated by setting the GlgNativeTooltip global configuration variable to GlgNativeTooltipType.BALLOON_TOOLTIP.
removal which allows complex 3D scenes to be
rendered in real time, as shown in the new demos: F-35
Lightning II Demo and Dog Fight Simulation.The
OpenGL-based hidden surface removal is
activated by setting the DepthSort
attribute of a viewport or a group object. If OpenGL driver is not
available, a slower non-OpenGL based depth sorting algorithm is used,
the same as in the previous versions.
transparently handles all aspects of the hidden surface removal, using
a common two-pass method to avoid "stitching" artifacts rendering
polygons with both fill and edges when the OpenGL hidden surface
removal is turned on. New global configuration variables are provided
to control the number of passes in cases when polygons have only fill
or only edges, as well as to change a default polygon offset used to
draw polygon edges.
Nested groups may have the DepthSort flag set to on or off for precise control of the rendering and to optimize performance of complex 3D scenes. For example, text labels and annotations may be placed in a separate group with DepthSort=NO to make sure they are always drawn on top regardless of their position in the 3D space. The drawing order of objects is still relevant and may be used to always draw translucent objects on top of other objects to obtain a desired effect.
To avoid very long
refresh intervals when a large drawing with the OpenGL hidden-surface
removal is accidentally loaded in the GDI version of the Toolkit, the
Z-sorting operation is aborted for large drawings if the OpenGL driver
is not available. The GlgMaxNonGLZSortSize
global configuration resource may be used to control the maximum number
of objects to be Z-sorted.
In the new release, hardware-based lighting is
automatically activated for viewports that have a Light object added
and use the OpenGL driver. When the OpenGL driver is not available, a
slower method inherited from the previous versions is used.
A new POINT light type is now supported for viewports with the OpenGL driver. If the OpenGL driver is not available, the FLAT light type will be used instead of the POINT light.
The Shading polygon attribute can now
activate shading of the polygon fill and edges. Previously, only the
polygon fill was shaded depending on its orientation relatively to the
light source. Now shading can be activated for edges as well. This
feature is available for both OpenGL and GDI drivers and across all
deployment options (C/C++/C#/Java/ActiveX).
GLG ports for embedded
Linux on ARM-based processors are now available. Downloads for both ARM6 and ARM7 architectures are provided,
including Raspberry Pi and BeagleBone boards. The ports use X
Windows for graphics rendering and work with Debian, Ubuntu and Red Hat
distributions, as well as with their derivatives. Custom on-demand
ports can be also done upon request.
Support for new hex and octal format options
(%x, %X and %o) was added to the
FormatD transformation. A new Format
Type parameter was added to specify the format type (integer or
double). The double format options include %f, %g, %G, %e and %E
formats. All floating-point format options are now supported across all
deployment options - C/C++/C#/Java/OCX.
A new Range Conversion transformation was introduced to replace the previous Range transformation. The new transformation has an independent InputValue parameter that makes it easier to use the input value to control multiple parameters constrained to it. The new transformation was used to enhance Controls and Process Widget Sets and simplify their usage as described in the following sections.
The old range transformation is deprecated in the new release: it will still work in the old drawings, but it is replaced with the new range conversion transformation in the Graphics Builder by default. The EnableDeprecatedTransforms option in the GLG configuration file may be used to enable deprecated transformations in the Enterprise version of the Builder.
A new Linear transformation provides an extended set of parameters that allow a developer to define more elaborate functionality with a single transformation. The old linear transformation was deprecated in the same way as the old range transformation.
The new Range Conversion and Linear transformations also provide a simple editing interface which eliminates a source of confusion by preventing the user from directly altering the value of a variable when a transformation is attached to it.
A new Identity transformation was also introduced and used for the internals of control widgets. The Identity transformation may be activated in the Enterprise version of the Graphics Builder by setting the EnableAdvancedTransforms option to 1 in the GLG configuration file.
Special Widget Set now
includes new Layout widgets
that provide layout templates for drawings with navigation menus and
toolbars. Widgets with a variety of layout and resizing options are
All widgets in the
Controls Widget set, as well as other input widgets (such as text
input, option menus, lists, etc.), were redesigned to simplify constraining their
input value parameters to other objects in a drawing.
For example, a Value resource of a Value Display widget can be constrained directly to a Value resource of a slider or numerical text input to display the entered value. Previously, the OutValue resource had to be used instead of Value; the OutValue resource was eliminated in the new version of the controls.
Even better, the Value resource of a slider, a spinner or some other widget can be constrained to another parameter in the drawing without affecting the control's functionality, which was not possible in the previous versions. This makes it possible to link the output value of two controls by simply constraining their Value resources.
The new design uses the new Range Conversion and Identity transformations to implement the controls' functionality.
The Process Control
symbols were modified to take advantage of the new Range Conversion
transformation, which makes it easy
to constrain a text widget to display a value of a tank.
Support for the Control key modifier
was added to GLG buttons and toggles, so that they can be activated only when the Control key is
If a button or a toggle with the GlgButton handler has a resource named ArmedState (and its value is different from -1), the interaction handler will set the resource value to 0 or 1 depending on the state of the Control key, and will allow the button to be activated with the mouse click only when the Control key is pressed.
The ArmedState resource was added to the buttons and toggles in the Controls Widget Set and is set to -1 be default to deactivate the Control key feature. To enable it, set the ArmedState resource to 0.
A custom default font table can now be
specified globally by using the GlgDefaultFontTableFile global
configuration resource (or the GLG_DEFAULT_FONT_TABLE_FILE
environment variable) which points to a GLG drawing (.g) file
containing the font table. For the GLG editors, GlgDefaultFontTableFile may also be
set in the GLG configuration file.
The drawing file can contain a font table saved via the Save Font Table option in the Font Table Properties dialog. For the convenience of editing, the drawing file can also contain a viewport object named $Widget, in which case the font table of the viewport will be used as the default font table.
The GlgDefaultFontTable global configuration variable is also provided for advanced use and may be set to an object ID of a font table object.
Support for Granularity and Increment parameters was added to
the native slider objects with the GlgNSlider
input handler. Previously, these parameters were supported only by the GlgSlider input handler.
On Windows, Granularity is set to 1000 globally by default to fix non-exact slider values at the ends of the slider's interval. The GlgScrollbarGranularity global configuration resource is provided to specify the global granularity value.
The PageIncrement parameter of the GlgNSlider interaction handler can now be set to -1 to automatically use the slider size as the page increment.
The handling of BOUND
attributes of subdrawing objects was changed to set the attributes' Global flag to LOCAL for the
subdrawing instances for convenience of using bound attributes in
multilayered subdrawings and subwindows. Previously, the Global flag of rebound attributes
was inheriting the BOUND state, which caused problems for nested
subdrawings and required the flag to be manually set to LOCAL in all
The EnableCache attribute was added to the GLG Image object. The value of the attribute may be set to NO to suppress caching images that need to reload an image from a periodically updating image file.
method was added to the Standard API. The method allows an application to clear data buffers not only of
the chart itself, but also the buffers of the chart's individual plots.
New GlgChangeObject method was added to the Standard API for all deployment options. It may be used to force the object to re-setup and/or redraw without setting new values of object attributes. For example, invoking the method for the ImageFile attribute of an image object with EnableCache=NO causes the image to reload the image file.
New GlgSetFocus method of the Standard API may be used to set a keyboard focus to a parent viewport of an object in a cross-platform way.
New GlgGetModifierState method of the Standard API may be used to get the current state of the Shift and Control modifier keys in a cross-platform way, eliminating a need to use the Trace callback.
Support for %e, %E, %g and %G floating
point formats of the FormatD transformation was added to the
Java version of the Toolkit. All floating point formats and the GlgNText input handler are now
using the current locale for formatting.
The performance and rendering quality of rotated text, as well as spherical and elliptical gradients, was improved by using native Java features that became available since the Java version 1.6.
The new version of the GLG Java class library increased the use of internal caches for faster performance.
The mutable GlgDouble class is now used internally for all D resource queries instead of immutable Java Double for increased performance. Alternative versions of the GetDResource and SetDResource methods that use GlgDouble were added; the new methods can be used to minimize the use of the garbage collector.
The DrawTicks parameter was added to the GlgNSlider handler. Setting the parameter value to a non-zero value activates drawing ticks for JSliders. The number of ticks is specified by the Granularity parameter if it is defined, otherwise the value of the DrawTicks parameter is used as the number of ticks.
The JAVA_OBJECT container element type was deprecated and replaced with NATIVE_OBJECT for better compatibility with the C# DLL. The old constant will continue to work for backward compatibility.
New Java bean properties, SelectEnabled, HierarchyEnabled, TraceEnabled and Trace2Enabled, were added to fine-tune the use of the bean's callbacks in a way compatible with the new C# User Control. The properties are automatically set when the corresponding listeners are added to the bean. All callbacks other than Trace and Trace2 are enabled by default, and the properties may be used to explicitly enable or disable specific callbacks by setting the value of a corresponding property before the bean's drawing is loaded.
The new release adds support for Qt 5 and provides
integration files for both Qt 4 and Qt5. On the X Windows platforms, support for an alternative XCB bindings
was added, allowing developers to use GLG in both Xlib and XCB
environments, such as Qt 5.
Enabled the use of embedded top-level dialog viewports in Qt and GTK integrations in the X Windows environment, which was not previously possible with the X11-based GLG library. The embedded top-level dialog viewports are enabled by setting the viewport's ShellType attribute. The top-level dialogs support DeleteWindow action, allowing the program to handle dialog closing.
Glyph caching was extended to the Windows binary driver for
C/C++/ActiveX. The glyph cache increases text rendering speed in OpenGL
and also the rendering speed of the rotated text in GDI. Previously, it
was available only in X Windows.
Added support for
simultaneous use of a transparent color defined by
the image object and GIF transparent color; previously, only one or
another was supported, but not both. On Windows, in the C/C++ or
ActiveX environment, this feature is supported only with the OpenGL
The run-time size of fixed-scale top-level viewports is now set to be the same as their size in the Graphics Builder at design time, unless the size is explicitly set by a program. For resizable viewports, the default run-time size depends on the size of the screen they are displayed in.
The -p option was added to the gconvert file conversion utility. The option may be used to specify a file name pattern for the recursive and multiple files modes. The pattern supports the * and ? wild cards. Only the files with names matching the specified pattern will be processed.
A new GLG Graphics
Builder Quick Reference Guide is now available online at the
Added a menu option for
replacing a Viewport object
with a SubWindow.
Added fractional choices
to the option menu of the Visibility
attribute to facilitate using the attribute for transparency and dimming. On
Windows, transparency is supported in the Builder only in the OpenGL
mode. However, the semi-transparent settings of the Visibility are still active even in
the GDI mode to make it possible to define the semi-transparent
settings for the C# and Java run-time options which do not depend on
The ConstrainOne option of the Attribute Object dialog in the Graphics Builder is now disabled by default to avoid confusion. The ConstrainAll option should be used in most cases; if needed, the ConstrainOne option can be enabled using the Options, Selection Options, Enable ConstrainOne menu option, or by setting EnableConstrainOne in the GLG configuration file.
Deprecated and Advanced transformations are now disabled in the Graphics Builder by default, and can be activated by setting corresponding options in the GLG configuration file. Currently, the advanced transformations group includes only the Identity transformation; this will be expanded in the future.
Increased number of items in the recent drawings menu to 10.
Added a Skip Command button to the Animation Command dialog of the Run Mode.
Changed Undo and Paste keyboard
accelerators on X Windows (to Ctrl-Z
and Ctrl-V, respectively) for
uniformity between all supported platforms.
Added Ctrl-U keyboard accelerator for the Public Properties dialog.
Disabled the File, Open menu option while
editing a subdrawing's template to avoid accidental rewriting of the
Improved handling of the
visibility attribute of a child with visibility value greater than 1
inside a parent group with the visibility less than 1, to allow an
element of a semi-transparent group to increase its opacity level.
Handling of gray scale JPEG images in the OpenGL
driver was fixed.
Special cases of moving objects that have control points with an offset transformation attached was improved to properly move offset points regardless of the objects' drawing order.
Display of span marks in the Graphics Builder was made more consistent for stretched subdrawings.
A special case of selecting arcs with even number of points is now properly handled for all mouse positions.
Fixed handling of custom events attached to the top viewport when the mouse event occurred in the child viewport.
Fixed handling of custom events attached to objects inside viewports that are completely obscured.
Fixed X error reporting in Qt integration.
Improved pixel mapping
of OpenGL thick lines with even line widths for crispier rendering with
Changed child viewports to inherit the DisplayName attribute from the parent viewport to allow the GLG Generic API in multi-display environment to use drawings with embedded viewports.