GlueGen

Last updated
GlueGen
Developer(s) JogAmp Community
Stable release
2.5.0 / August 18, 2023;9 days ago (2023-08-18)
Preview release
n/a / tbd
Operating system Cross-platform
Type 3D computer graphics software (library/API)
License BSD license
Website jogamp.org/gluegen/www/

GlueGen is a Java tool which automatically generates the Java and Java Native Interface (JNI) code needed to call C libraries from Java code. It reads in ANSI C header files and GlueGen configuration files, and emits C code. As JNI can be complex, Gluegen simplifies the process of binding Java to C native libraries.

Contents

It was originally developed for Java OpenGL (JOGL), a Java OpenGL library, although the project has since been separated so it can be used with other libraries. As of 2010, it is also used in Java OpenAL (JOAL), which allows Java code to access OpenAL libraries.

Use of GlueGen in JOGL

For JOGL, GlueGen is used to bind OpenGL to Java, and to the low-level windowing system application programming interface (APIs) on the Microsoft Windows, X Window System and Mac OS X platforms.

See also

Related Research Articles

In computing, cross-platform software is computer software that is designed to work in several computing platforms. Some cross-platform software requires a separate build for each platform, but some can be directly run on any platform without special preparation, being written in an interpreted language or compiled to portable bytecode for which the interpreters or run-time packages are common or standard components of all supported platforms.

In software design, the Java Native Interface (JNI) is a foreign function interface programming framework that enables Java code running in a Java virtual machine (JVM) to call and be called by native applications and libraries written in other languages such as C, C++ and assembly.

<span class="mw-page-title-main">Standard Widget Toolkit</span>

The Standard Widget Toolkit (SWT) is a graphical widget toolkit for use with the Java platform. It was originally developed by Stephen Northover at IBM and is now maintained by the Eclipse Foundation in tandem with the Eclipse IDE. It is an alternative to the Abstract Window Toolkit (AWT) and Swing Java graphical user interface (GUI) toolkits provided by Sun Microsystems as part of the Java Platform, Standard Edition (J2SE).

The Simplified Wrapper and Interface Generator (SWIG) is an open-source software tool used to connect computer programs or libraries written in C or C++ with scripting languages such as Lua, Perl, PHP, Python, R, Ruby, Tcl, and other languages like C#, Java, JavaScript, Go, D, OCaml, Octave, Scilab and Scheme. Output can also be in the form of XML.

<span class="mw-page-title-main">Java 3D</span> Java 3D graphics API

Java 3D is a scene graph-based 3D application programming interface (API) for the Java platform. It runs on top of either OpenGL or Direct3D until version 1.6.0, which runs on top of Java OpenGL (JOGL). Since version 1.2, Java 3D has been developed under the Java Community Process. A Java 3D scene graph is a directed acyclic graph (DAG).

<span class="mw-page-title-main">Java OpenGL</span>

Java OpenGL (JOGL) 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-source project under a BSD license. It is the reference implementation for Java Bindings for OpenGL (JSR-231).

<span class="mw-page-title-main">Lightweight Java Game Library</span> Open-source Java software game library

The Lightweight Java Game Library (LWJGL) is an open-source software library that provides bindings to a variety of C libraries for video game developers to Java. It exposes cross-platform libraries commonly used in developing video games and multimedia titles, such as Vulkan, OpenGL, OpenAL and OpenCL.

Java AWT Native Interface (jawt) is an interface for the Java programming language that enables rendering libraries compiled to native code to draw directly to a Java Abstract Window Toolkit (AWT) Canvas object drawing surface.

A foreign function interface (FFI) is a mechanism by which a program written in one programming language can call routines or make use of services written or compiled in another one. An FFI is often used in contexts where calls are made into binary dynamic-link library.

Platform Invocation Services, commonly referred to as P/Invoke, is a feature of Common Language Infrastructure implementations, like Microsoft's Common Language Runtime, that enables managed code to call native code.

The Apple Developer Tools are a suite of software tools from Apple to aid in making software dynamic titles for the macOS and iOS platforms. The developer tools were formerly included on macOS install media, but are now exclusively distributed over the Internet. As of macOS 10.12, Xcode is available as a free download from the Mac App Store.

In Microsoft Windows applications programming, OLE Automation is an inter-process communication mechanism created by Microsoft. It is based on a subset of Component Object Model (COM) that was intended for use by scripting languages – originally Visual Basic – but now is used by several languages on Windows. All automation objects are required to implement the IDispatch interface. It provides an infrastructure whereby applications called automation controllers can access and manipulate shared automation objects that are exported by other applications. It supersedes Dynamic Data Exchange (DDE), an older mechanism for applications to control one another. As with DDE, in OLE Automation the automation controller is the "client" and the application exporting the automation objects is the "server".

Java OpenAL (JOAL) is one of several wrapper libraries that allows Java programmers to access OpenAL. This allows Java programmers to use 3D sound in applications. JOAL is one of the libraries developed by the Sun Microsystems Game Technology Group. JOAL is released under a BSD license, and is available for Microsoft Windows, Mac OS X, and Linux. Like its graphical counterpart, Java OpenGL (JOGL), JOAL was developed using the GlueGen utility, a program that generates Java bindings from C header files. The official site on java.net was deleted in March 2011. The JOAL project, however, is still alive in Jogamp.org JOAL.

Java Native Access (JNA) is a community-developed library that provides Java programs easy access to native shared libraries without using the Java Native Interface (JNI). JNA's design aims to provide native access in a natural way with a minimum of effort. Unlike JNI, no boilerplate or generated glue code is required.

Wrapper libraries consist of a thin layer of code which translates a library's existing interface into a compatible interface. This is done for several reasons:

JNAerator is a computer programming tool for the Java programming language which automatically generates the Java Native Access (JNA) or BridJ code needed to call C, C++ and Objective-C libraries from Java code.

<span class="mw-page-title-main">API</span> Software interface between computer programs

An application programming interface (API) is a way for two or more computer programs to communicate with each other. It is a type of software interface, offering a service to other pieces of software. A document or standard that describes how to build or use such a connection or interface is called an API specification. A computer system that meets this standard is said to implement or expose an API. The term API may refer either to the specification or to the implementation.

Windows Runtime (WinRT) is a platform-agnostic component and application architecture first introduced in Windows 8 and Windows Server 2012 in 2012. It is implemented in C++ and officially supports development in C++, Rust/WinRT, Python/WinRT, JavaScript-TypeScript, and the managed code languages C# and Visual Basic .NET (VB.NET).

The Android Native Development Kit (NDK) provides a cross-compiling tool for compiling code written in C/C++ can be compiled to ARM, or x86 native code (or their 64-bit variants) for Android. The NDK uses the Clang compiler to compile C/C++. GCC was included until NDK r17, but removed in r18 in 2018.