JOGL Demos
Java™ Binding for the OpenGL® API (JSR-231)
Overview

The JOGL-Demos project contains Java programming language demonstrations utilizing OpenGL through the JOGL API. Demonstrations exhibit advanced functionality such as vertex and fragment programs, shadow maps and hardware-accelerated offscreen rendering via pbuffers. Most of the demos were ported from C or C++, in which case a link to the original sources is provided.

The demos below require Java Web Start, which is included in J2SE 1.4.2; click the images to launch the demos. Where there are no hardware or operating system requirements listed, the demos run on any vendor's graphics card and on any of Solaris/SPARC, Solaris/x86, Linux/x86, Windows/x86, and Macintosh OS X 10.3.

It is now possible to deploy unsigned applets using JOGL with no manual installation of any software on the end user's machine! Please see the following test pages for more information:

The source code for these demonstrations is available via GIT.

Useful Links
Gears

Description
Requirements
Launch Gears demo Classic OpenGL demo. Original source code by Brian Paul; converted to Java by Ron Cemer and Sven Goethel.
None
Grand Canyon Demo

Description
Requirements
Launch Grand Canyon demo A flight simulator written in the Java programming language using the New I/O APIs and OpenGL to visualize a large terrain data set in real time. Related article, including source code, on the Swing Connection.
None
Hardware Shadow Mapping

Description
Requirements
Launch Hardware Shadow Mapping demo Shadowing demo using projective texture technique of hardware shadow maps. Original source code by NVidia.
Pbuffer support, ARB_shadow, ARB_depth_texture
High Dynamic Range Rendering

Description
Requirements
Launch High Dynamic Range Rendering demo High Dynamic Range rendering demo utilizing 16-bit-per-channel floating-point pbuffers through NVidia, ATI or Apple extensions. Uses NVidia HILO or Apple or ATI floating point cubemaps. Intermediate results are rendered to floating-point pbuffers and tonemapped to 24-bit RGB before display. Original source code supplied in NVidia's SDK. This demo is known to work on Windows with suitable NVidia or ATI hardware, and on X11 platforms with suitable NVidia hardware (no floating-point pbuffer support is available on X11 from ATI as of this writing). The demo should run properly on Mac OS X soon pending some driver-level bug fixes.
One of GL_NV_float_buffer, GL_ATI_texture_float, or GL_APPLE_float_pixels; ARB_multitexture; ARB_vertex_program; ARB_fragment_program
Infinite Shadow Volumes

Description
Requirements
Launch Infinite Shadow Volumes demo Shadowing demo using geometric technique of infinite shadow volumes. Original source code by NVidia.
None
JRefract

Description
Requirements
Launch JRefract demo Variant of NVidia's vtxprog_refract demo showcasing JOGL's hardware-accelerated Swing component. Original source code supplied in NVidia's SDK.

If running on Java SE 6 (Mustang), try the fully OpenGL-accelerated version of this demo using the new Java2D/JOGL interoperability support!


pbuffer support, ARB_vertex_program
Particle Engine

Description
Requirements
Launch Particle Engine demo Particle engine demo controlling a set of animated particles with a Swing UI. Contributed by Ben Chappell.
None
TextRenderer Test

Description
Requirements
Launch TestTextRenderer demo A simple test of JOGL's new TextRenderer utility class, with text overlaid on the Gears demo.
None
Flying Text

Description
Requirements
Launch FlyingText demo A more advanced demo of the TextRenderer, showing animated and colored text with drop shadows.
None
Custom Text

Description
Requirements
Launch CustomText demo A more advanced demo of the TextRenderer, showing the use of a custom RenderDelegate to achieve fancy Java 2D-based font effects.
None
Text Flow

Description
Requirements
Launch TextFlow demo Shows how to use the TextRenderer to draw dynamically flowing text in OpenGL.
None
Text Cube

Description
Requirements
Launch TextCube demo Shows how to use the TextRenderer to draw 2D text in 3D.
None
Vertex Program Warp

Description
Requirements
Launch Vertex Prog Warp demo Geometrical deformations performed on the graphics card using vertex programs. Original source code supplied in NVidia's SDK.
ARB_vertex_program
Vertex Program Refract

Description
Requirements
Launch Vertex Prog Refract demo Real-time reflection and refraction with chromatic aberration using vertex and fragment programs. Original source code by NVidia.
ARB_vertex_program and either ARB_fragment_program or NV_register_combiners
Water (Procedural Texture Physics)

Description
Requirements
Launch Procedural Texture Physics demo Runs a physics-based water simulation entirely on the graphics card using vertex programs, fragment programs and pbuffers. Original source code supplied in NVidia's SDK.

Pbuffer support, ARB_vertex_program, ARB_fragment_program
XTrans

Description
Requirements
Launch XTrans demo Illustrates another use of the Java2D/JOGL interoperability bridge to provide OpenGL-accelerated animated transitions for unmodified Swing components. Requires Java SE 6 (Mustang) build 53 or later.
Java SE 6 (Mustang) build 53 or later
Vertex Buffer Object

Description
Requirements
Launch Vertex Buffer Object demo Demonstrates high-throughput dynamic geometry using ARB_vertex_buffer_object extension. Original source code supplied in NVidia's SDK; ported both to Java/JOGL and ARB_vertex_buffer_object extension.
ARB_vertex_buffer_object
Vertex Array Range

Description
Requirements
Launch Vertex Array Range demo Demonstrates high-throughput dynamic geometry using NVidia vertex_array_range extension. Original source code supplied in NVidia's SDK.
NVidia GeForce series card; Windows or Linux (JOGL's vertex_array_range support not yet ported to Mac OS X)
Simple NEWT JNLP AWT Applet's
GL2ES1 Cube
GL2ES1 FBO Cubes
GL2ES1 Angeles
GL2 Gears