Javatpoint Logo
Javatpoint Logo

Install OpenGL Ubuntu

OpenGL stands for Open Graphics Library. It is a cross-platform and cross-language API (Application Programming Interface) to render 3D and 2D vector graphics. Typically, the API is used to collaborate with a GPU (Graphics Processing Unit) to gain hardware-accelerated rendering.

SGI (Silicon Graphics Inc.) started developing OpenGL in 1991 and published it on 30 June 1992; applications extensively used in the fields of video games, flight simulation, information visualization, scientific visualization, virtual reality, and CAD (Computer Aided Design). OpenGL has been handled by a non-profit technology consortium Khronos Group since 2006.

  • The specifications of OpenGL define an abstract API to draw 3D and 2D graphics.
  • However, it is possible to be entirely implemented in software for the API; it is designed to be entirely or mostly implemented in hardware.
  • This API is described as a function set that may be known by the client program with a named integer constant set.
  • However, the definitions of the functions are superficially the same as those of the C programming language.
  • OpenGL has several language bindings; a few of the most noteworthy are the JavaScript binding WebGL, the C bindings CGL, GLX, and WGL; the C binding offered by iOS; and the C and Java bindings offered by Android.

Also, OpenGL is cross-platform in inclusion to being language-independent. The specification defines nothing on the subject of maintaining and obtaining an OpenGL context, leaving it as the underlying windowing system details. For a similar reason, OpenGL is focused on rendering, offering no APIs related to winnowing, audio, or input.

Development of OpenGL

OpenGL is not in the active development process. Whereas, between 2014 and 2001, OpenGL specification was mostly updated on a yearly basis, along with two releases taking place in 2009 and three in 2010. The latest OpenGL specification, 4.6, was published in 2017 and was restricted to the addition of eleven existing EXT and ARB extensions in the core profile.

New editions of the OpenGL specifications are published by the Khronos Group, all of which extend the API for supporting several new aspects. The details of all editions are determined by consensus among the members of the group, including operating system designers, graphics card manufacturers, and general technology companies like Google and Mozilla.

In addition to the aspects needed by the core API, GPU vendors may offer extra functionalities in the extension form. Extensions may define new constants and functions and may remove or relax limitations on existing functions of OpenGL. Vendors can utilize extensions to disclose custom API without requiring support from the Khronos Group or other vendors as a whole, which highly increases OpenGL flexibility. Every extension is collected in, and described by, the OpenGL Registry.

The aspects introduced by all new editions of OpenGL are generally formed from the mixed aspects of many extensively implemented extensions, especially extensions of EXT and ARB types.

OpenGL Documentation

The Architecture Review Board of OpenGL published a manual series with the specification which have been upgraded to track modifications in the API. Commonly these are referred to by their cover colors:

Install OpenGL Ubuntu
  • The Red Book
    • 9th edition, OpenGL Programming Guide
    • The Official Guide to learn OpenGL, the 4.5 version with SPIR-V.
  • The Orange Book
    • 3rd edition, OpenGL Shading Language
    • A reference and tutorial book for GLSL.
  • The Green Book
    • For the X Window System, OpenGL Programming
    • A book about GLUT (OpenGL Utility Toolkit) and X11 interfacing.
  • The Blue Book
    • 4th edition, OpenGL Reference manual Mainly a hard copy of the Unix manual pages for OpenGL
    • Contains a fold-out poster-sized diagram displaying an idealized OpenGL implementation structure
  • The Alpha Book
    • For Windows NT and 95, OpenGL Programming
    • A book about OpenGL using Microsoft Windows
    • The documentation of OpenGL is also accessible from its official webpage.

Associated libraries of OpenGL

The earliest OpenGL versions were published with a companion library known as GLU (OpenGL Utility Library). It provided useful and simple aspects which were rarely to be supported in new hardware, like tessellating and generating primitive shapes and mipmaps. The GLU specification was last upgraded in 1998 and depends on the features of OpenGL, which are deprecated now.

Window and context toolkits

Given that making an OpenGL context is a complex task and given that it varies between different operating systems. The creation of automatic OpenGL context has become a basic aspect of many user interfaces and game-development libraries, including Qt, FLTK, SFML, Allegro, and SDL.

Some libraries have been solely designed to generate an OpenGL-capable window. The initial such library was GLUT (OpenGL Utility Toolkit), later outmoded by freeglut. A new alternative is GLFW.

  • These toolkits are developed to create and handle OpenGL windows and handle input, but beyond that.
    • GLFW: A keyboard-mouse-joystick and cross-platform windowing handler; it is game oriented
    • GLUT (OpenGL Utility Toolkit): A mature windowing handler, not maintained now.
    • freeglut: A keyboard-mouse and cross-platform windowing handler; its API is the GLUT API subset, and it's more up-to-date and stable than GLUT.
  • Many "multimedia libraries" can make OpenGL Windows in inclusion to sound, Input, and other operations helpful for game-like software.
    • Allegro 5: It is a cross-platform multimedia library along with a C API concentrated on game development.
    • SFML: It is a cross-platform multimedia library along with a C++ API and several other bindings to languages like Go, Haskell, Java, and C#.
    • SDL (Simple DirectMedia Layer): It is a cross-platform multimedia library along with a C API.
  • Widget toolkits
    • wxWidgets: It is a cross-platform widget toolkit of C++.
    • Qt: It is a cross-platform widget toolkit of C++. It gives several OpenGL helper objects, which can abstract away the distinction between OpenGL ES and desktop GL.
    • FLTK: It is a small cross-platform widget library of C++.

Extension loading libraries

Some liabilities have been developed that load every available function and extension automatically, given the huge workload involved in recognizing and loading OpenGL extensions. Examples include glbinding, GLEW (OpenGL Extension Wrangler Library), and GLEE (OpenGL Easy Extension Library). Also, extensions are automatically loaded by almost all language bindings, like PyOpenGL and JOGL.

Implementations

Mesa 3D is a free OpenGL implementation. It can do authentic software rendering and might also utilize hardware acceleration on Linux, BSD, and other platforms by getting the benefit of the Direct Rendering Infrastructure. It implements the 4.6 version of the OpenGL standard as of the 20.0 version.

History of OpenGL

Developing applications that could work with a huge variety of graphics hardware was an actual challenge in the 1980s. Application developers wrote custom drivers and interfaces for all hardware pieces. It was expensive and appeared in effort multiplication.

SGI (Silicone Graphics) was head for workstations in 3D graphics by the early 1990s. Their IRIS GL API is used more extensively as compared to the open standard-based PHIGS. It was due to IRIS GL being examined as convenient to use, and it was backed by immediate mode rendering. PHIGS was considered outdated and hard to use in functionality by contrast.

  • The competitors of SGI (including IBM, Hewlett-Packard, and Sun Microsystems) were also capable of taking to market 3D hardware backed by extensions created to the PHIGS standard, which pushed SGI to open source an IRIS GL version as a public standard known as OpenGL.
  • Although, SGI had several customers for whom the modification to OpenGL from IRIS GL would demand important investment.
  • IRIS GL also had API functions unimportant to 3D graphics.
  • For instance, it included a mouse, keyboard, and windowing API because it was integrated before the Sun's NeWS and X Window System.
  • The libraries of IRIS GL were unsuitable to open due to patent and license issues.
  • These factors needed SGI to continue supporting the proprietary and advanced Iris performer and Iris Inverter programming APIs during market support for matured OpenGL.
  • In 1992, SGI led the establishment of the OpenGL ARB (OpenGL Architecture Review Board), the group of enterprises that would expand and maintain the OpenGL specification.
  • In 1994, SGI played with the plan of publishing something known as "OpenGL++", which added elements like a scene-graph API (probably their performance technology-based). The specification was released between some interested parties.
  • In 1996, Microsoft published Direct3D, which ultimately became the primary OpenGL competitor. More than 50 game developers registered an open letter for Microsoft, published on 12 June 1997, actively calling on the enterprise to support OpenGL.
  • On 17 December 1997, SGI and Microsoft started the Fahrenheit project, a combined effort with the aim of unifying the Direct3D and OpenGL interfaces. In 1998, Hewlett-Packard was involved in the project.
  • Initially, it displayed a few promises of taking the order to the interactive 3D computer graphics APIs world. Still, on the financial constraint account at SGI, strategic causes at Microsoft, and insufficient support of the industry, it was discarded in 1999.
  • The OpenGL Architecture Review Board has chosen to transfer the OpenGL API standard control to the Khronos Group in July 2006.

Version History of OpenGL

The first 1.0 OpenGL version was published on 30 June 1992 by Kurt Akeley and Mark Segal. Occasionally, OpenGL has been developed by publishing a new specification version since then. Such releases describe a baseline feature set that every conforming graphics card should support and as opposed to which new extensions can be more easily written. All new OpenGL versions tend to interact with many extensions which have global support among the vendors of the graphics card. However, the details of these extensions may be modified.

Install OpenGL Ubuntu

OpenGL 2.0

Originally, the 2.0 version of OpenGL was acquired by 3Dlabs to define concerns that OpenGL lacked and stagnated in a strong direction. 3Dlabs announced several big additions to the standard. At the time, almost all of these were not accepted by the ARB or never came to materialization in the way that 3Dlabs announced. However, their announcement for a C-style shading language was completed eventually, resulting in the latest formulation of the GLslang or GLSL (OpenGL Shading Language).

OpenGL 3.0 and Longs Peak

Before the release of the 3.0 of OpenGL, the new revision had the Longs Peak codename. At the time of its actual announcement, Longs Peak was illustrated as the initial big API revision in the lifetime of OpenGL. It is composed of an overhaul to the form in that OpenGL operates, calling for fundamental modifications to the API.

OpenGL 3.0

The 3.0 version of OpenGL defined a deprecation method to simplify further API revisions. Certain features highlighted as deprecated could completely be disabled by claiming a forward-compatible context through the windowing system. However, by claiming a full context, the features of OpenGL 3.0 could still be accessed with these deprecated features.
Deprecated features are as follows:

  • The 1.10 and 1.20 versions of OpenGL Shading Language
  • Indexed-color rendering targets
  • Display lists
  • Direct-mode rendering with glEnd and glBegin
  • Every fixed-function fragment and vertex processing

Open 3.1

The 3.1 version of OpenGL fully deleted every aspect which was deprecated in the 3.0 version with the wide line exception. It is not possible to use new aspects with a full context or to use deprecated aspects with a forward-compatible context from this release onwards. An extension is made to the former rule if the implementation supports the extension, i.e., ARB_compatibility, but it is not guaranteed.

Open 3.2

The 3.2 version of OpenGL further made on the deprecation methods defined by the 3.0 version of OpenGL by categorizing the specification into a compatibility profile and core profile. Compatibility contexts contain the fixed-function and previously-removed APIs, the same as the ARB_compatibility extension published with the 3.1 version of OpenGL, while core contexts don't. Also, the 3.2 version of OpenGL contained an upgrade to the 1.50 version of GLSL.

OpenGL 3.3

Mesa supports softpipe, software Driver SWR, and previous Nvidia cards using NV50.

OpenGL 4.0

The 4.0 version of OpenGL was published with the 3.3 version. It was developed for hardware capable of supporting Direc3D 11. As in the 3.0 version of OpenGL, this OpenGL version includes several fairly inconsequential extensions created to thoroughly disclose the capabilities of Direc3D 11-class hardware. The most influential extensions are mentioned as follows:

Hardware support: AMD Radeon HD 5000 Series and newer, Nvidia GeForce 400 Series and newer, Intel HD Graphics in Intel Ivy Bridge processor and newer.

  • OpenGL 4.1
    • Hardware support: AMD Radeon HD 5000 Series and newer, Nvidia GeForce 400 Series and newer, Intel HD Graphics in Intel Ivy Bridge processor and newer.
  • OpenGL 4.2
    • Supports shaders with read-modify-write load-store-atomic and atomic counter operations to a texture one level
    • Drawing many data instances captured through GPU vertex processing to enable complicated objects to be replicated and repositioned efficiently
    • Supports changing a compressed texture arbitrary subset without needing to re-download the entire texture for important performance improvements to the GPU.
    • Hardware support: AMD Radeon HD 5000 Series and newer, Nvidia GeForce 400 Series and newer, Intel HD Graphics in Intel Ivy Bridge processor and newer.
  • OpenGL 4.3
    • Computer shaders pulling GPU parallelism inside the graphics pipeline context
    • Shader storage buffer objects, permitting shaders to write and read buffer objects, such as image store/load from 4.2, but from the language instead of function calls.
    • EAC/ETC2 texture compression as a basic feature
    • Queries of the image format parameter
    • Full compatibility using OpenGL ES 3.0 APIs
    • Texture views to clarify textures in distinct styles without data replication
    • Debug abilities to get debugging messages at the time of the application development
    • Multi-application robustness and enhanced memory security
    • Hardware support: Intel Graphics in Intel Haswell processors and newer, AMD Radeon HD 5000 Series and newer, Nvidia GeForce 400 series and newer.
  • OpenGL 4.4
    • Efficient binding of more than one object simultaneously
    • More layout control expression in shaders of interface variables
    • Asynchronous queries inside the buffer objects
    • Usage control of enforced buffer object
    • Hardware support: Intel HD Graphics in Intel Broadwell processors and newer, AMD Radeon HD 5000 Series and newer, Nvidia GeForce 400 series and newer, Tegra K1.
  • OpenGL 4.5
    • OpenGL ES 3.1 API and shader compatibility: It is used to enable convenient development and the latest OpenGL ES application execution on desktop systems.
    • Robustness: It provides a secure environment for applications, like WebGL Browser, such as preventing a GPU reset from influencing any other active applications.
    • Flush control: The applications can manage pending command flushing before context switching. It enables multi-threaded high-performance application.
    • DSA (Direct State Access): The object accessors let the state to be modified and queried without binding objects for middleware flexibility, efficiency, and increased application.
    • Hardware support: Intel HD Graphics in Intel Broadwell processors and newer, AMD Radeon HD 5000 Series and newer, Nvidia GeForce 400 series and newer, Tegra X1, and Tegra K1.
  • OpenGL 4.6
    • Developed anisotropic filtering
    • SPIR-V shaders
    • Polygon offset function clamping resolves a shadow rendering issue
    • High performance by no error managing contexts
    • More information from statistics, counters, and overflow query
    • More adequate shader execution
    • More adequate, geometry processing, GPU-sided
    • Driver support
      • NVIDIA GeForce 397.31 Graphics Driver in only Windows 7, 8, 9, 10*86-64 bit, no support for 32-bit. Published April 2018.
      • Intel 26.20.100.6861 graphics driver in Windows 10. Published May 2019.
      • AMD Adrenalin 18.4.1 Graphics Driver in Windows 7 SP1, 10 version 1803 for AMD Radeon HD 7700+, HD 8500+, and newer. Published April 2018.
      • Mesa 19.2 in Linux supports OpenGL 4.6 for Intel Broadwell and newer. The 20.0 version of Mesa supports AMD Radeon GPUs, during support for Nvidia Kepler+ is in progress. Also, Zink as Emulation Driver using 21.1 and software driver LLVMpipe supports Mesa 21.0.
    • Hardware support: Intel Haswell processors and newer, AMD Radeon HD 7000 Series and newer, Nvidia GeForce 400 series and newer.

Alternative implementations of OpenGL

Apple detracted OpenGL in macOS 10.14 Mojave and iOS 12 in favor of Metal. However, it is still present as of macOS 13 Ventura (such as Apple silicon devices). The 4.1 version is the latest supported version for OpenGL from 2011. From MoltenVK Molten authors, a library can convert OpenGL calls into Metal which is known as MoltenGL.

There are many projects which try to implement OpenGL on the head of Vulkan. The backend of Vulkan for ANGEL achieved OpenGL ES 3.1 conformance with Google in July 2020. Also, the Mesa3D project contains such a driver, known as Zink.

OpenGL Future

Apple detracted OpenGL APIs on each of their platform (tvOS, macOS, and iOS) in June 2018, highly encouraging developers to utilize their Metal API, which was announced in 2014. Only Google operating system Fuchsia and Stadia support Vulkan. id Software published an update for the id Tech 6 game engine that supports Vulkan in 2016 while preserving support for OpenGL. ID Tech 7 removed OpenGL support.

Valve revealed that it would be deleting OpenGL through Dota 2 in the future update on 17 September 2021. With Samsung's support, Atypical Games updated the game engine to utilize Vulkan, instead of OpenGL, around every non-Apple platform. OpenGL does not support Ray tracing, which is an API used for video decoding in GPU in comparison to Vulkan. Mesa shaders only support nVidia. OpenGL does not support the anti-aliasing algorithm using deep learning- AMD FSR (FidelityFX Super Resolution) and Nvidia DLSS.

Installing OpenGL in Ubuntu

First, we will open our terminal window and update the package repository with the help of the following command:

Now, we will run the below command in the terminal window:


Install OpenGL Ubuntu





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA