|
OpenGL with SWTSWT is a rapidly rising alternative to AWT and Swing. It came from the Eclipse Project, but is a very good standalone toolkit in its own right. It does many things in a completely different fashion and uses it's own native code interfaces, thus completely independent of AWT. Until mid 2005 there was no capability for rendering to SWT components using OpenGL. Since then a number of different efforts are underway with different aims. The Eclipse group have their own SWT OpenGL page with a basic summary of each of the approaches that could be used, as well as example code snippets to show how each is used. Here we expand on those as well as have access to our implementation of the JSR 231 API. A lot of projects that use OpenGL also want to use OpenAL for spatialised audio handling. Since you're here looking for SWT/Eclipse support, you may also be interested in our Java OpenAL eclipse plugin support too.
OpenGL OptionsThere are 3 basic options for interacting OpenGL with SWT widgets. These options work, potentially with limited versions of SWT. These options are to use the LWJGL API, the formal OpenGL bindings provided by JSR 231 with an implementation that supports SWT (the default reference implementation provided by Sun does not), or using the OpenGL API bindings and canvas classes in the SWT codebase.
LWJGLThe LWJGL bindings are the oldest of all the interfaces to SWT. LWJGL is a complex wrapper that includes OpenGL 2.0 as well as many other APIs, such as OpenAL, input device handling and more. It operates by binding a GLContext to whatever SWT Canvas you give it. It works with SWT 3.0 and later. LWJGL has been used in many different gaming projects. JOGL
The JOGL bindings are those formallised within the Sun Java Community Process.
They use the package We also maintain a separate implementation of the JOGL APIs that do cater to SWT directly that doesn't interact with AWT at all. These are still under heavy development, but we're already using them as part of Aviatrix3D and Xj3D on Win32 machines (other platforms following rapidly). You can download and read more about these bindings on our JOGL page. You can also find on that page an Eclipse plugin implementation of the full SWT + JOGL implementation code. Eclipse Native Bindings
The Eclipse project is also offering their bindings to OpenGL as well. These
are available from version 3.2M3 and later. These bindings are relatively
simple, catering only to OpenGL 1.1 (ie nothing much more than geometry and
basic textures). These can be found in the package
|
[ j3d.org Home ]
[ Java OpenGL ]
[ Aviatrix3D ]
[ Tutorials ]
[ Books ]
[ Contact Us ]
Last Updated: $Date: 2010-01-27 21:23:17 -0800 (Wed, 27 Jan 2010) $ |