This is a collection of Java programs and source code examples that I've written for doing 3D graphics in Java. Most of this code is directed toward directly accessing OpenGL from Java using the GL4Java binding. GL4Java is a JNI interface that allows you to directly access OpenGL on your platform from Java. All that is required is a version of the GL4Java native interfaces compiled for your platform. I have used this on both MacOS and Windows 98 platforms and the performance is excellent. GL4Java makes it a snap to port all those tons of cool OpenGL programs out there to Java. You can find some examples below.
NOTE: Recently, I've begun porting my 3D graphics code from GL4Java to JOGL. GL4Java doesn't appear to be actively supported anymore and JOGL has a few technical advantages since it could take advantage of the lessons learned from GL4Java. JOGL's API is almost identical to GL4Java's which makes porting very easy.
The following are executable Java programs that I've written that demo some 3D graphics methods using GL4Java:
A program for visualizing a 3D strange attractor attributed to Pickover.
A program that renders a large 3D landscape using a simple varient of the ROAM level-of-detail algorithm.
A program that renders a large 3D landscape using the very simple and very high performance Geometrical MipMapping level of detail algorithm. Has been ported to JOGL!
A Java program that demonstrates how to use a Virtual Sphere for 3D rotations using a 2D input device (mouse). Has been ported to JOGL!
The following are some Java source code packages or libraries that I have written for working with OpenGL from Java. I hope they will be useful to others.
A package containing useful classes and utility methods for working with 3D graphics and OpenGL/GL4Java in particular.
The following are links to web pages containing source code and information that I have found particularly useful in my own projects.
Directly access OpenGL from Java!! This makes porting the huge collections of OpenGL programs out there to Java a snap! Plus the performance is excellent. I never thought that I would see Java perform 3D so well.
An open source project to create virtual terrain rendering tools.