Java Bindings for OpenGL

Core OpenGL API and GLU library calls are available from Java through a thin wrapper looking very much as the original OpenGL C API, Except GLU NURBS routines which are not exposed through the public API.

All platform specific libraries (available from the CGL API for Mac OS X, GLX for X Window System, and WGL for Microsoft Windows) are also abstracted out to create a platform independent way of selecting Framebuffer attributes and performing platform specific Framebuffer operations.

Platform-specific extensions are not included in the public API.

Each implementation can choose to export some of these APIs via the GL.getPlatformGLExtensions() Archived 2011-02-17 at the Wayback Machine and GL.getExtension(String) Archived 2011-02-17 at the Wayback Machine method calls which return Objects whose data types are specific to the given implementation.

This example shows how to draw a polygon (without initialization or repaint code).