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)
Table of Contents: Learning Java Bindings for OpenGL (JOGL)
This book describes JOGL which was approved as JSR 231 and will become the javax.media.opengl package.
-T. Gene Davis
copyright 2004 by Gene Davis of genedavissoftware.com
Chapter 1: Hello JOGL
First There Was OpenGL
For some years now, a programmer that wanted to create a graphics intensive program that could be sold to users of different Operating Systems had one choice — OpenGL. The GL stands for Graphics Library. OpenGL is a registered trademark of SGI. OpenGL manifests itself as a cross platform C programming API. In reality though, it is a hardware-independent specification for a programming interface.
Most of the reasons that people have given me over the years for the lack of a future for Java especially in the gaming industry was that you can’t use OpenGL in Java. They rightly pointed out that the fastest 2D and 3D applications use OpenGL.
OpenGL is for making graphics. It is fast. Most of the time it is hardware accelerated. It seems that OpenGL can do anything visually that you would want to do.
Unfortunately OpenGL is written for C. Let’s face it, C is not the most popular language for programming complex applications. One of the biggest drawbacks to OpenGL is that you can’t make it do anything without a window to put your graphics in, but OpenGL doesn’t provide a means for you to create windows. This makes OpenGL hard to learn for beginners.
Luckily GLUT was introduced and made dealling with windows, buttons and events generated by users easier to add to OpenGL heavy applications. Still learning OpenGL in C or even C++ can be painful for new programmers or programmers that want to use true Object Oriented Programming.
Continue reading Chapter 1: Hello JOGL – Learning Java Bindings for OpenGL (JOGL)