Swogl
Swing meets OpenGL
Swogl is a library for displaying and interacting with Swing components in 3D.
It can be used to easily create standalone applications with Swing Components
in 3D, or to integrate Swing components into existing applications. Nearly
all sorts of Swing components can be used to create a
SwoglComponent, which is a three-dimensional
representation of the Swing component. A SwoglComponent may consist
of arbitrary geometry, and may be freely arranged in space. SwoglComponents
may be added to a
SwoglContainer, which provides a
component for 3D rendering and manages the interaction with the SwoglComponents.
It may also arrange multiple SwoglComponents in space using 3D layout
managers.
The current version of Swogl should be considered as an
alpha version,
and thus,
the API of Swogl may still change!.
A bit of history:
A very early alpha version of Swogl had been published a while ago. The
current version of Swogl has been significantly extended and improved
compared to the first release. The improvements addressed, among others,
the issues that were brought up in the
Swogl forum
and through the feedback that I received via mail. The main improvements compared
to the initial alpha release are:
-
Different rendering backends: The initial version of Swogl was only
intended to work with JOGL, and was tightly bound to the specific implementation
of JOGL. For the rendering in the new version of Swogl, different Java
bindings for OpenGL may be employed:
Additionally, the interfaces have been designed to allow an easy extension
to support other rendering systems.
-
Custom rendering: Originally, a Swogl application could only be used
to display SwoglComponents, and it was not possible to perform custom rendering
steps or render other scene elements. The refactoring for the new version of
Swogl also targeted a more universal applicability of Swogl. While it is still
possible to easily create a standalone Swogl application with a few lines of
code, the current implementation also offers classes that make it easier to
include the functionality of Swogl in existing applications.
-
Custom interaction: In the initial version of Swogl, specific ways
of controlling the SwoglComponents, camera and 3D layouts had been defined,
and it was not possible to modify the interaction in any way. The new version
provides a public interface for the camera, allows fine-grained control over
the processing of mouse events, and separates the actual functionality of the
3D layout managers from the way how they are controlled.