General Graphics Interface

Last updated
General Graphics Interface
Developer(s) GGI developers
Stable release
2.2.2 / January 27, 2007;17 years ago (2007-01-27)
Type Application programming interface
License MIT license
Website www.ibiblio.org/ggicore/index.html

General Graphics Interface (GGI) was a project that aimed to develop a reliable, stable and fast computer graphics system that works everywhere. [1] The intent was to allow for any program using GGI to run on any computing platform supported by it, requiring at most a recompilation. GGI is free and open-source software, subject to the requirements of the MIT License.

Contents

The GGI project, and its related projects such as KGI, are generally acknowledged to be dead. [2]

Goals

The project was originally started to make switching back and forth between virtual consoles, svgalib, and the X display server subsystems on Linux more reliable. The goals were:

The GGI framework is implemented by a set of portable user-space libraries, with an array of different backends or targets (e.g. Linux framebuffer, X11, Quartz, DirectX), of which the two most fundamental are LibGII (for input-handling) and LibGGI (for graphical output). All other packages add features to these core libraries, and so depend on one or both of them.

Some targets talk to other targets. These are called pseudo targets. Pseudo targets can be combined and work like a pipeline.

One example: display-palemu, for example, emulates palette mode on truecolor modes. This allows users to run applications in palette mode even on machines where no palette mode would be available otherwise. display-tile splits large virtual display into many smaller pieces. You can spread them on multiple monitors or even forward them over a network.

History

Andreas Beck and Steffen Seeger founded The GGI Project in 1994 after some experimental precursors that were called "scrdrv". [3]

Development of scrdrv was motivated by the problems caused by coexisting but not very well cooperating graphics environments (mainly X and SVGAlib) under the Linux operating system at this time which frequently lead to lockups requiring a reboot. The first scrdrv design was heavily influenced by the graphics subsystem of the DJ DOS extender and some concepts from the SANE project. The basic problem that scrdrv solved was that it provided a kernel mode driver that knew enough of the video hardware to set up modes, thus allowing to get into a sane state even from a messed-up or crashed graphics application.

The first official version appeared in 1995. About 1996, GGI 1.0 was released under the LGPL license. GGI only consisted of the core lib named libggi. It included input handling, a set of 2d graphic primitives and some userspace drivers for graphic boards along with a Linux kernel patch with the userspace interface for the drivers. The patch was known as KGI, the Kernel Graphics Interface.

In 1997, GGI went into a complete re-design. Many new ideas and a decision from Linux made GGI to what it became in GGI 2.0 released in August 2001 under the MIT release.

In 1998, there was a big flame war on the linux kernel mailing list about getting KGI into the kernel. Linus Torvalds explained his concerns [4] about GGI stating, "I think that X is good enough" and expressing concern regarding the overall direction of GGI.

During this time, another design idea called EvStack also added to the flamewar. EvStack was a pretty much complete redesign of the input and output subsystem that allowed for events (thus the "Ev") to flow through a "Stack" of modules that can be configured to manipulate them. EvStack is a very powerful concept, allowing e.g. to have two keyboards attached to the same machine, one operating a text console on one graphics adapter and one operating a graphics console on the other (as was demonstrated on the Linux-Kongreß ´97 [5] ) and even allows for having different keyboard layouts on different virtual consoles or attaching keyboards via network. However this came at the price of a huge patch to the input subsystem which did not seem acceptable. The modern Linux input event system allows programs (e.g. Xorg) to receive keyboard events other than through the console keyboard, allowing multiseat operation.

A set of talks about GGI, KGI and EvStack were given at LinuxExpo 98.

For GGI 2.0, KGI was split off and became its own project named The KGI Project. GGI 2.0 consisted of a set of libraries. During the 2.0 beta phase in late 1998 the license of the libraries was changed from LGPL to a MIT-style license. Much work was also done on the buildsystem to support more operating systems. It worked on FreeBSD, code for OpenBSD, NetBSD and even Microsoft Windows were there as well as some support for more hardware platforms.

Input handling was moved into a library called libgii. Generic GGI code was in libgg, a sublib within libgii. The core graphic library, libggi, has a lightweight set of graphic primitives that was common enough to write any kind of graphic application, while higher-level API went into other libraries on top of libggi. These were called GGI extensions. libggi support a set of targets, most of them were Linux specific: fbdev, X, aa, vcsa, terminfo and some pseudo targets such as tile, multi, palemu and trueemu. The GGI extensions featured higher-level API. libggiwmh provides functionality for windowed only targets, at that time this was only X. libggimisc provided some basic stuff like vga splitline.

GGI 2.0.2 was released in December 2002. The most user visible change was from the scratch re-designed X backend. Another noticeable change was the huge documentation improvement. Last, but not least, the release cycles changed. From this release on, there was a development and a stable tree. The stable tree is open for bugfixes only, the development tree got the name, following the BSD scheme, -current.

November 2004, the last bugfix from the GGI 2.0.x stable tree was released in favour for a new GGI 2.1.x stable tree.

GGI 2.1.x runs on many Operating Systems: GNU Hurd, Linux, *BSD, System V, Mac OS X and Microsoft Windows. Support for more hardware platforms has been added. NetBSD even created a binary package for NetBSD/Vax! A new GGI library on top of libgii called libgiigic has been added. It allows to combine user actions with events at run time.

GGI 2.2 was released in December 2005. The target auto detection has been reworked and was no longer linux centric. GGI replaced its own integer datatypes with ANSI C99 types for more portability. A target for Quartz has been added. Mac OS X users no longer depend on X11 but still can use the X11 backend. The most user visible change, however, was the support for static linked in targets.

Latest release is GGI 2.2.2, a bugfix release in the GGI 2.2.x stable series. It was released in January 2007.

Adoption

Source ports of first-person shooters Doom , Heretic , Quake and Descent were ported to use GGI, [6] [7] with a Linux Doom Editor also being based on it. [8] It was also supported by the arcade styled Heroes, [9] a snake game, and Thrust, inspired by the Commodore 64 game Thrust , [10] as well as the platform games U.R.B.A.N The Cyborg Project [11] and Dave Gnukem, [12] inspired by the original Duke Nukem for MS-DOS. GGI was also available as a video driver within the Simple DirectMedia Layer until version 2x. [13]

Status as of 2006

The GGI Project was moving onward to the GGI 3.0 release.[ when? ] libgii had been re-designed. The input handling had been replaced with a reactor event model, which is more flexible than using select() on a file descriptor. This also simplified the input-drivers in general, particularly for those who don't use file descriptors such as input-quartz. libgg had been moved out into a separate library.

libggi had merged some targets into one sublib, multi with tile and mono text with palemu. libggi also had gotten a new VNC target, which allowed to run any application as a VNC server.

In GGI 3.0, the extension mechanism had been re-designed from scratch to simplify interactions between the extensions and the core libs. This required a little API change.

See also

Related Research Articles

<span class="mw-page-title-main">Operating system</span> Software that manages computer hardware resources

An operating system (OS) is system software that manages computer hardware and software resources, and provides common services for computer programs.

<span class="mw-page-title-main">Linux framebuffer</span> Abstraction layer for Linux kernel to show graphics on the system console

The Linux framebuffer (fbdev) is a linux subsystem used to show graphics on a computer monitor, typically on the system console.

DirectFB is a software library with a small memory footprint that provides graphics acceleration, input device handling and abstraction layer, and integrated windowing system with support for translucent windows and multiple display layers on top of the Linux framebuffer without requiring any kernel modifications. DirectFB is free and open-source software subject to the terms of the GNU Lesser General Public License (LGPL).

<span class="mw-page-title-main">XNU</span> Computer operating system kernel

XNU is the computer operating system (OS) kernel developed at Apple Inc. since December 1996 for use in the Mac OS X operating system and released as free and open-source software as part of the Darwin OS, which in addition to macOS is also the basis for the Apple TV Software, iOS, iPadOS, watchOS, visionOS, and tvOS OSes.

<span class="mw-page-title-main">QEMU</span> Free virtualization and emulation software

QEMU is a free and open-source emulator. It emulates a computer's processor through dynamic binary translation and provides a set of different hardware and device models for the machine, enabling it to run a variety of guest operating systems. It can interoperate with Kernel-based Virtual Machine (KVM) to run virtual machines at near-native speed. QEMU can also do emulation for user-level processes, allowing applications compiled for one architecture to run on another.

The Direct Rendering Manager (DRM) is a subsystem of the Linux kernel responsible for interfacing with GPUs of modern video cards. DRM exposes an API that user-space programs can use to send commands and data to the GPU and perform operations such as configuring the mode setting of the display. DRM was first developed as the kernel-space component of the X Server Direct Rendering Infrastructure, but since then it has been used by other graphic stack alternatives such as Wayland and standalone applications and libraries such as SDL2 and Kodi.

SVGAlib is an open-source low-level graphics library which ran on Linux and FreeBSD and allowed programs to change video mode and display full-screen graphics, without the use of a windowing system. Alongside X11 and the General Graphics Interface, it was one of the earliest libraries allowing graphical video games on Linux.

<span class="mw-page-title-main">Linux kernel interfaces</span> An overview and comparison of the Linux kernal APIs and ABIs.

The Linux kernel provides multiple interfaces to user-space and kernel-mode code that are used for varying purposes and that have varying properties by design. There are two types of application programming interface (API) in the Linux kernel:

  1. the "kernel–user space" API; and
  2. the "kernel internal" API.

In computer networking, STREAMS is the native framework in Unix System V for implementing character device drivers, network protocols, and inter-process communication. In this framework, a stream is a chain of coroutines that pass messages between a program and a device driver. STREAMS originated in Version 8 Research Unix, as Streams.

In computing, ioctl is a system call for device-specific input/output operations and other operations which cannot be expressed by regular file semantics. It takes a parameter specifying a request code; the effect of a call depends completely on the request code. Request codes are often device-specific. For instance, a CD-ROM device driver which can instruct a physical device to eject a disc would provide an ioctl request code to do so. Device-independent request codes are sometimes used to give userspace access to kernel functions which are only used by core system software or still under development.

A hybrid kernel is an operating system kernel architecture that attempts to combine aspects and benefits of microkernel and monolithic kernel architectures used in operating systems.

<span class="mw-page-title-main">Kernel-based Virtual Machine</span> Virtualization module in the Linux kernel

Kernel-based Virtual Machine (KVM) is a free and open-source virtualization module in the Linux kernel that allows the kernel to function as a hypervisor. It was merged into the mainline Linux kernel in version 2.6.20, which was released on February 5, 2007. KVM requires a processor with hardware virtualization extensions, such as Intel VT or AMD-V. KVM has also been ported to other operating systems such as FreeBSD and illumos in the form of loadable kernel modules.

nouveau (software) Open source software driver for Nvidia GPU

nouveau is a free and open-source graphics device driver for Nvidia video cards and the Tegra family of SoCs written by independent software engineers, with minor help from Nvidia employees.

dm-crypt is a transparent block device encryption subsystem in Linux kernel versions 2.6 and later and in DragonFly BSD. It is part of the device mapper (dm) infrastructure, and uses cryptographic routines from the kernel's Crypto API. Unlike its predecessor cryptoloop, dm-crypt was designed to support advanced modes of operation, such as XTS, LRW and ESSIV, in order to avoid watermarking attacks. In addition to that, dm-crypt addresses some reliability problems of cryptoloop.

Binary-code compatibility is a property of a computer system, meaning that it can run the same executable code, typically machine code for a general-purpose computer Central processing unit (CPU), that another computer system can run. Source-code compatibility, on the other hand, means that recompilation or interpretation is necessary before the program can be run on the compatible system.

<span class="mw-page-title-main">Mode setting</span>

Mode setting is a software operation that activates a display mode for a computer's display controller by using VESA BIOS Extensions or UEFI Graphics extensions.

<span class="mw-page-title-main">Linux console</span> Console of the Linux kernel

The Linux console is a system console internal to the Linux kernel. A system console is the device which receives all kernel messages and warnings and which allows logins in single user mode. The Linux console provides a way for the kernel and other processes to send text output to the user, and to receive text input from the user. The user typically enters text with a computer keyboard and reads the output text on a computer monitor. The Linux kernel supports virtual consoles – consoles that are logically separate, but which access the same physical keyboard and display. The Linux console are implemented by the VT subsystem of the Linux kernel, and do not rely on any user space software. This is in contrast to a terminal emulator, which is a user space process that emulates a terminal, and is typically used in a graphical display environment.

<span class="mw-page-title-main">NetBSD</span> Free and open-source Unix-like operating system

NetBSD is a free and open-source Unix operating system based on the Berkeley Software Distribution (BSD). It was the first open-source BSD descendant officially released after 386BSD was forked. It continues to be actively developed and is available for many platforms, including servers, desktops, handheld devices, and embedded systems.

<span class="mw-page-title-main">ROCm</span> Parallel computing platform: GPGPU libraries and application programming interface

ROCm is an Advanced Micro Devices (AMD) software stack for graphics processing unit (GPU) programming. ROCm spans several domains: general-purpose computing on graphics processing units (GPGPU), high performance computing (HPC), heterogeneous computing. It offers several programming models: HIP, OpenMP/Message Passing Interface (MPI), OpenCL.

References

  1. Loki Software, Inc; John R. Hall (2001). Programming Linux Games. No Starch Press. p. 56. ISBN   978-1-886411-49-4.
  2. Larabel, Michael (3 July 2011). "The Kernel Graphics Interface (KGI) Is Effectively Dead - Phoronix". www.phoronix.com. Retrieved 2019-06-08.
  3. Beck, Andreas (1996-11-01). "Linux-GGI Project". Linux Journal . Retrieved 2023-12-20.
  4. marc.info
  5. linux-kongress.org
  6. "Software using GGI". ibiblio . Retrieved 2023-12-20.
  7. Beck, Andreas (1998-09-01). "LibGGI: Yet Another Graphics API". Linux Journal . Retrieved 2023-12-20.
  8. Amstutz, Peter (2002-08-09). "LDE - Linux Doom Editor". Interreality. Retrieved 2024-01-23.
  9. Duret-Lutz, Alexandre (November 2000). "Announcing Heroes 0.7". Simple DirectMedia Layer .
  10. Payne, Dennis (2021-09-19). "Inertia Blast". Identical Software. Retrieved 2024-01-21.
  11. Slater, Zachary J. (2016-10-17). "The Linux Gamers' Game List". icculus.org . Retrieved 2024-01-21.
  12. "Software Announcements". Linux Weekly News. 2000-01-06. Retrieved 2024-01-21.
  13. "FAQ: Using SDL". wiki.libsdl.org.