Developer Tutorial

From JReality Wiki
Revision as of 09:50, 1 April 2014 by Andre (Talk | contribs) (Viewers)

(diff) ←Older revision | view current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

What to expect

This tutorial is designed to help you learn how to write Java applications using the jReality package. You should already know how to program in Java. If you work through the examples shown here, you'll be able to create your own hierarchical scene graphs and populate them with a wide variety of geometry, appearances and transformations. You'll learn how to set camera and lights. You'll also learn how to write your own interactive tools and insert them into the scene graph. Finally you'll learn helpful tips for optimizing your performance and avoiding some common pitfalls.

Most of the tutorials demonstrate how to do a certain thing in jreality, based on a short code example.

Bold tutorial links contain documentation or detailed background information.

Suggestions and corrections to gunn at

Getting started

For accessing the newest jReality source code, see Checking out the current jReality source.

For command line usage, consult this document, which also gives directions for installing JOGL, a java package which jReality uses to obtain hardware accelerated rendering.

As you work through this tutorial, you may wish to consult the following documents which describe more conceptually how jReality works:

Tutorial examples

Each of the following tutorial examples is structured as follows:

  • A link to the full source code of the Java class in the de.jreality.tutorial directory,
  • Optional links to the JavaDoc of the jReality classes featured in the tutorial class,
  • A link to run the tutorial example as a Java webstart,
  • Commentary on selected parts of the source code, and
  • A screenshot showing the intended result of running the tutorial example (not always present).

The Java classes which are contained in this tutorial can also be found in the jReality source tree under the folder src-tutorial if you wish to work with them directly. They can all be run as standalone Java applications.


  • Introduction to jReality programming. The following sequence of tutorial examples is designed to teach you the basics of jReality programming. It is generally modeled on the User Tutorial. Here, you will learn how to program the capabilities that you there learned how to activate interactively. (Old version here.)



For an introduction to the use of appearances in jReality, see the introductory tutorial (this section and this section). The following examples assume you have mastered the fundamentals presented there.


Input / Output



Developers who want to add new devices need to learn about the tool system.


Lights and cameras



Graphical user interface

JReality provides a plugin-based system to create user interfaces.

Other topics

Sample projects

Jogl3-backend usage

Previous: Main Page Developer Tutorial: Contents Next: [[]]