Java OpenGL explained

JOGL
Screenshot Size:200px
Developer:JogAmp Community
Latest Release Version:2.5.0
Latest Preview Version:n/a
Latest Preview Date:tbd
Programming Language:Java, C
Operating System:Cross-platform
Genre:3D computer graphics software (library/API)
License:BSD license

Java OpenGL (JOGL) is a wrapper library that allows OpenGL to be used in the Java programming language.[1] [2] It was originally developed by Kenneth Bradley Russell and Christopher John Kline, and was further developed by the Game Technology Group at Sun Microsystems. Since 2010, it has been an independent open-source project under a BSD license. It is the reference implementation for Java Bindings for OpenGL (JSR-231).

JOGL allows access to most OpenGL features available to C language programs through the use of the Java Native Interface (JNI). It offers access to both the standard GL* functions along with the GLU* functions; however the OpenGL Utility Toolkit (GLUT) library is not available for window-system related calls, as Java has its own windowing systems: Abstract Window Toolkit (AWT), Swing, and some extensions.

Design

The base OpenGL C API, as well as its associated Windowing API,[3] are accessed in JOGL via Java Native Interface (JNI) calls. As such, the underlying system must support OpenGL for JOGL to work.

JOGL differs from some other Java OpenGL wrapper libraries in that it merely exposes the procedural OpenGL API via methods on a few classes, rather than trying to map OpenGL functionality onto the object-oriented programming paradigm. Indeed, most of the JOGL code is autogenerated from the OpenGL C header files via a conversion tool named GlueGen, which was programmed specifically to facilitate the creation of JOGL.

Status and standardization

, JOGL provides full access to the OpenGL 4.5 specification as well as almost all vendor extensions (and OpenCL, OpenMAX and OpenAL).[4] The 1.1.0 version is the reference implementation for JSR-231 (Java Bindings for OpenGL).[5] The 1.1.1 release gave limited access to GLU NURBS, providing rendering of curved lines and surfaces via the traditional GLU APIs. The 2.3.2 release added support for OpenGL versions up to 4.5, and OpenGL ES versions up to 3.2.

Wayland and Vulkan support is planned.[6]

Java2D-OpenGL interoperability

Since the Java SE 6 version of the Java language, Java2D (the API for drawing two dimensional graphics in Java) and JOGL have become interoperable, allowing it to :

Tutorials

Code examples

@Override public void display(GLAutoDrawable drawable)

See also

External links

Notes and References

  1. Web site: Friesen . Jeff . 2008-09-18 . mdy . Open source Java projects: Java Binding for OpenGL (JOGL) . Open Source Java Tutorials . . 2020-07-23 . JOGL originated as a project named Jungle, which was created by 3D graphics experts Ken Russell (of Sun Microsystems) and Chris Kline (of Irrational Games)..
  2. Web site: Davis . Gene . 2005-02-21 . mdy . Hello JOGL . . 2020-07-23.
  3. Web site: 3D & Multimedia Across Platforms and Devices Using JOGL . . 2010-07-27 . 2011-02-06.
  4. Web site: JOGL - Java Binding for the OpenGL API.
  5. Web site: JSR-000231 Java Bindings for the OpenGL API . . 2011-02-06 . In order to facilitate maximum community participation for the Java Binding for the OpenGL API, we use the JOGL project on java.net found at https://jogl.dev.java.net. The JOGL source code can be found there, licensed under a liberal source code license (mostly licensed as BSD except where we use other parties' licensed code). We take a snapshot of the code from this project every few months, run the Technology Compatibility Kit on the source code, and then officially make it the Reference Implementation for each formal Java Binding for the OpenGL API release..
  6. Web site: Bug 794 - Add Wayland Windowing/Surface Interoperability . 2013-08-05.
  7. Web site: JOGL Userguide.