Java Bindings for OpenGL
Encyclopedia
Java Binding for the OpenGL API is a JSR
API specification (JSR 231) for the Java SE platform which allows to use OpenGL
on the Java Platform. There is also Java Binding for the OpenGL ES API (JSR 239) for the Java ME platform.
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 and GL.getExtension(String) method calls which return Objects whose data types are specific to the given implementation.
implementation:
Which translates to the following Java
implementation:
Java Community Process
The Java Community Process or JCP, established in 1998, is a formalized process that allows interested parties to get involved in the definition of future versions and features of the Java platform....
API specification (JSR 231) for the Java SE platform which allows to use OpenGL
OpenGL
OpenGL is a standard specification defining a cross-language, cross-platform API for writing applications that produce 2D and 3D computer graphics. The interface consists of over 250 different function calls which can be used to draw complex three-dimensional scenes from simple primitives. OpenGL...
on the Java Platform. There is also Java Binding for the OpenGL ES API (JSR 239) for the Java ME platform.
Programming concepts
Core OpenGL API and GLU library calls are available from JavaJava (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...
through a thin wrapper looking very much as the original OpenGL C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....
API, Except GLU NURBS
Nonuniform rational B-spline
Non-uniform rational basis spline is a mathematical model commonly used in computer graphics for generating and representing curves and surfaces which offers great flexibility and precision for handling both analytic and freeform shapes.- History :Development of NURBS began in the 1950s by...
routines which are not exposed through the public API.
All platform specific libraries (available from the CGL
Core OpenGL
Core OpenGL, or CGL, is Apple Inc.'s Macintosh Quartz windowing system interface to the Mac OS X implementation of the OpenGL specification...
API for Mac OS X
Mac OS X
Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...
, GLX
GLX
GLX provides the interface connecting OpenGL and the X Window System: it enables programs wishing to use OpenGL to do so within a window provided by the X Window System.-History:...
for X Window System
X Window System
The X window system is a computer software system and network protocol that provides a basis for graphical user interfaces and rich input device capability for networked computers...
, and WGL for Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...
) are also abstracted out to create a platform independent way of selecting Framebuffer
Framebuffer
A framebuffer is a video output device that drives a video display from a memory buffer containing a complete frame of data.The information in the memory buffer typically consists of color values for every pixel on the screen...
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 and GL.getExtension(String) method calls which return Objects whose data types are specific to the given implementation.
Example
This example shows how to draw a polygon (without initialization or repaint code). Here is the reference CC (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....
implementation:
Which translates to the following Java
Java (programming language)
Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java platform. The language derives much of its syntax from C and C++ but has a simpler object model and fewer low-level facilities...
implementation:
Implementations
- Java OpenGLJava OpenGLJava OpenGL is a wrapper library that allows OpenGL to be used in the Java programming language. It was originally developed by Kenneth Bradley Russell and Christopher John Kline, and was further developed by the Sun Microsystems Game Technology Group. Since 2010, it has been an independent open...
: The reference implementation, available on Microsoft WindowsMicrosoft WindowsMicrosoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...
, LinuxLinuxLinux is a Unix-like computer operating system assembled under the model of free and open source software development and distribution. The defining component of any Linux system is the Linux kernel, an operating system kernel first released October 5, 1991 by Linus Torvalds...
, Mac OS XMac OS XMac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Since 2002, has been included with all new Macintosh computer systems...
, and Solaris platforms.