# Jogl Demos - Documentation

This download contains the demos for the Jogl package. To run the demos:

- Add the jars in the lib directory to your CLASSPATH (jogl-demos.jar, jogl-demos-util.jar, jogl-demos-data.jar)
- Run one of the demos from the command line: e.g. `java demos.gears.Gears` (Note: the current working directory is not important)

# Additional Resources

There are additional resources for running and experimenting with the JOGL demos:

- The source code for these demos is available as a separate download
- There is a source code project on java.net called jogl-demos that contains the JOGL demos source code under CVS at https://jogl-demos.dev.java.net
- These demos can also be run automatically in your browser using Java Web Start by going to https://jogl-demos.dev.java.net

# Hardware and Software Requirements

The demos currently have the following hardware and software requirements:

demos.gears.Gears | none
demos.hwShadowmapsSimple.HWShadowmapsSimple | Pbuffer support, ARB_shadow, ARB_depth_texture
demos.infiniteShadowVolumes.InfiniteShadowVolumes | none
demos.proceduralTexturePhysics.ProceduralTexturePhysics | Pbuffer support, ARB_vertex_program, ARB_fragment_program
demos.vertexArrayRange.VertexArrayRange | NVidia GeForce family card. Runs on Windows and Linux (Jogl's vertex_array_range support not yet ported to Mac OS X).
demos.vertexBufferObject.VertexBufferObject | ARB_vertex_buffer_object
demos.vertexProgRefract.VertexProgRefract | ARB_vertex_program and either ARB_fragment_program or NV_register_combiners
demos.vertexProgWarp.VertexProgWarp | ARB_vertex_program

# Per-demo controls

## Hardware Shadow Mapping

- Alt + left click and drag: rotate camera about focal point
- Alt + right click and drag: translate camera parallel to image plane
- Alt + left + right click and drag: zoom camera in/out
- Click and drag on the faces of the manipulators (look for the yellow highlight of the faces upon mouse over) to translate the manipulator parallel to that face. Use the handles outside the boxes to rotate, and the handles at the corners of the boxes to scale.
- Escape key or 'q' quits.
- Space bar cycles through view options. Shadowed view; view from light source; unshadowed view.
- 'v' recenters camera on object

## Infinite Shadow Volumes

- Alt + left click and drag: rotate camera about focal point
- Alt + right click and drag: translate camera parallel to image plane
- Alt + left + right click and drag: zoom camera in/out
- Click and drag on the faces of the manipulators (look for the yellow highlight of the faces upon mouse over) to translate the manipulator parallel to that face. Use the handles outside the boxes to rotate, and the handles at the corners of the boxes to scale.
- 'w' toggles wireframe view
- 'c' recenters camera on object
- Space bar toggles animation of figure
- 'v' toggles visualization of shadow volume

## Vertex Prog Warp

- Left click + drag: rotate camera about focal point
- Right click + drag: translate camera parallel to image plane
- Left + right click and drag: zoom camera in/out
- 'w' toggles wireframe mode
- Escape or 'q' quits
- 'r' resets the demo (including recentering object)
- left/right arrow keys cycle through warp effects
- 'h' produces a help screen
- '-'/'+' decreases/increases amplitude of deformation
- '['/']' decreases/increases frequency of deformation
- '1'..'5' changes model being viewed
- Space bar toggles animation

## Vertex Prog Refract

- Left click + drag: rotate camera about focal point
- Right click + drag: translate camera parallel to image plane
- Left + right click and drag: zoom camera in/out
- 'w' toggles wireframe mode
- Escape or 'q' quits
- '1' .. '4' changes model being viewed
- 's' toggles multipass rendering for chromatic aberration effect
- 'v' recenters the camera on the object
- Space bar toggles animation

## Procedural Texture Physics

- Alt + left click and drag: rotate camera about focal point
- Alt + right click and drag: translate camera parallel to image plane
- Alt + left + right click and drag: zoom camera in/out
- Space bar toggles animation
- 'r' resets the demo
- 'c'/'v' decrease/increase blur increment
- '-'/'=' decrease/increase bump scale
- 'l' (lowercase “L”) toggles effect of spinning and static textures on the water
- ','/'.' decrease/increase frequency of droplets