Table of Contents: Learning Java Bindings for OpenGL (JOGL)

This book and the excerpts on this blogĀ are from 2004. Obviously, the API has changed a bit since then. I provide the older information and book in the hope that it will be useful to some hobbyists.

Purchase Printed Book Learning Java Bindings for OpenGL (JOGL)


JSR-231 passed the Final Approval Ballot stage. Did you know Quake 2 has been ported to Java using JOGL? Here’s the website. The JOAL sound appears to be working now, and the graphics are great!. Welcome JOGL gaming!

Author’s Note (very old and unlikely needed): If you experience an “Unable to lock surface” error when running the code samples in this book, try backing out the JOGL build you are using to an April 2004 1.1 release and that should clear up your issue.

Table of Contents: Learning Java Bindings for OpenGL (JOGL)

This book describes JOGL which was approved as JSR 231 and will become the package.

-T. Gene Davis



Table of Contents


Why, what and how come I’m writing this.

Chapter 1: Hello JOGL

Introduction to JOGL and a Hello World to test your installation.

Chapter 2: Using What We’ve Seen

Introduces Cartesian coordinate system. Explanations of some methods used in JOGL apps.

Chapter 3: Animations

Animator explained and shown in use. Slope of line explained. Circles and transformations discussed.

Chapter 4: Using Events with GLCanvas

Details some of the AWT events that are available when using JOGL components.

Chapter 5: Going 3D

It’s time to enter the 3D world. This is where you’ll find the real matrix.

Chapter 6: Drawing Geometric Primitives

Formally introduce geometric primitives. Also introduce simple GLU quadrics. Discuss GLUT shapes.

Chapter 7: First Person Movement in 3D Space

Briefly touch on translation and then put together what we discussed thus far to show first person movement in JOGL.

Chapter 8: Lights

Ambient and diffuse light explained. Materials for coloring explained. Depth testing explained.

Chapter 9: Textures

Creating textures from images. Loading PNGs and conversion for use by JOGL as textures. Sample code and explanations of how to modify it for other uses.

Appendix A: JOGL Online Resources

These are web resources for browsing. They may give further insight into JOGL.

Appendix B: OpenGL Online Resources

Here are some more web resources for browsing. They may give further insight into OpenGL.

Appendix C: A Little Matrix Math

Matrices are so important to more advanced JOGL work that I felt I should include some details on what they are and how to manipulate them.

Appendix D: The JARs, Sources and a Brick Texture (Web Only)

Most of the examples in the book are JARed and ZIPed withwith their source code and found here. Just download the ZIPs and expand them to see the JARs and source code. I’ve made some improvements over the code in the book.