OpenGL ( Open Graphics Library; German Open Graphics Library ) is a specification for a platform and programming language independent programming interface for developing 2D and 3D computer graphics applications. The interface consists of over 250 different commands that allow the visualization of complex 3D scenes in real time. In addition, other organizations (mostly in graphics cards) define proprietary extensions.
The implementation of the OpenGL API is usually done through system libraries on some operating systems as part of the graphics card driver. These commands perform according to the graphics card, in particular non-existent on the graphics card functions must be emulated by the CPU.
The programming model
Many parameters can affect the appearance of the rendered objects, for example, they can be textured and lit, stretched, moved, transparent or opaque, they can have a rough or smooth surface and so on.
OpenGL was designed as a state machine that does not receive all the required parameters for each function call, but so long used the same values to the corresponding states are changed. In this way, you must not, for example for each vertex OpenGL notify the color you want, but sets a unique color, then all the following vertices are shown in this color. In the same way, one can globally lights on or off and set many other states.
The reason for this design is that almost any change in the character mode draws complex reorganizations of the graphics pipeline to be, so to avoid them prefer as long as it is reasonably possible. Also, it would be tedious for the programmer, again and again specify dozens of parameters. Often many thousands of vertices to be processed before another state must be changed, and some states even never be changed. For example, the light sources remain mostly the same for all objects in a scene. Many states are maintained for at least the duration of rendering an entire object, such as a car is shifted as a whole by a certain vector and not broken down into its individual parts and moved them one by one. In Direct3D pursues you this state-based concept.
An important property is its extensibility of OpenGL. Individual providers (typically graphics cards manufacturer) can extend the state machine of OpenGL to other states. Here, a four-stage approach is taken:
OpenGL was originally from Silicon Graphics (SGI ) developed IRIS GL. In the so-called Fahrenheit Project Microsoft and SGI tried to unify their 3D standards, the project was canceled because of financial difficulties on the part of SGI.
The OpenGL standard is defined by the OpenGL ARB ( Architecture Review Board ). The ARB has existed since 1992 and consists of a number of companies. Voting members are the companies 3Dlabs, Apple, ATI / AMD, Dell, IBM, Intel, Nvidia, SGI and Sun ( as of Nov 2004). Next cooperating companies are Evans and Sutherland, Imagination Technologies, Matrox, Quantum3D, S3 Graphics, Spinor GmbH, Tungsten Graphics, and Xi Graphics. Microsoft, one of the founding members, has left the ARB in March 2003.
New features in OpenGL are usually first introduced as a vendor- specific extensions, and then go via cross-vendor extensions and ARB extensions to core functionality. This allows to benefit from the latest capabilities of graphics hardware while still holding OpenGL abstract enough.
Since July 31, 2006 is the further development of the OpenGL API in the hands of the Khronos Group.
- Vertex Arrays
- Texture Objects
- Polygon offset
- 3D textures
- New pixel formats ( BGRA, Packed )
- Level -of- detail textures
- Introduced ARB Extensions
- ARB Multitexture
- Compressed textures
- Cube Maps
- Deep textures ( for shadow mapping )
- Mip-map automatic generation
- Fog coordinate
- Buffer objects ( Provision of data in graphics memory )
- Occlusion queries
- Shader programs OpenGL Shading Language
- Multiple Render Targets
- Textures of any size ( not 2n for height and width)
- Pixel Buffer Objects
- OpenGL Shading Language 1:20
- SRGB textures
- Cleaned up code base
- OpenGL Shading Language 1:30
- Removal of Contaminated Sites ( glBegin / glEnd, fixed-function pipeline, T & L, etc.)
- The architecture as a whole ( layer model) approximates to DirectX
- First time utmost renunciation explicit backward compatibility
- Further removal of contaminated sites (eg, fixed-function options, Direct mode and color- index mode), these are only the optional " compatibility extension" available
- OpenGL Shading Language 1:40
- Uniform Buffer Objects
- Vertex shader programs allow at least 16 texture lookups
- Primitive restart
- Copy Buffer API in cooperation with OpenCL.
- Higher execution speed
- Improved display quality
- Accelerated Geometry Processing
- Simplified porting Direct3D applications
- OpenGL Shading Language 1:50
- Geometry shaders are now supported when programming graphics pipelines directly in the OpenGL core
- Five ARB extensions
- Integration of OpenCL
- OpenGL Shading Language 3:30
- Integration of OpenCL
- OpenGL Shading Language 4:00
- Overloading Binary shader programs to save time
- 64- bit floating-point components in vertex shader input for greater precision
- Multiple viewports for a rendering surface
- OpenGL Shading Language 4:10
- OpenGL Shading Language 4:20
- Compute Shader programs for universal calculations
- OpenGL Shading Language 4:30
- Cross-platform texture compression after ETC2/EAC
- More stability between the OpenGL applications
- More control over the placement of buffers in memory
- OpenGL Shading Language 4:40
- Bind multiple OpenGL objects simultaneously to the context
- Compute Shader Variable Work- Group Size
The big jump from OpenGL 1.5 to 2.0 is explained by the introduction of the " OpenGL Shading Language ". This is such a great change and expansion that the ARB has decided to take this step. The Khronos Group has announced the specification for OpenGL 3.0 on August 11 for Siggraph 2008. The API has been (away from the fixed-function pipeline - towards an object-based system - towards the shaders or Programs, away from the State Machine ) extensively revised. This OpenGL is indeed still backwards compatible, but there are no new features for the old API more. The new OpenGL has powerful Geometry Shader 3.0 of the model for the first time.
With the rapid release of OpenGL 4.0 and its feature set - in particular the introduction of the tessellation - can the Khronos Group for a long time to catch up again and has again risen with DirectX (11 ) in competition.
Longs Peak and OpenGL 3.0 controversy
Before the release of version OpenGL 3.0 on 11 August 2008, this revision of the API was known under the code name " Longs Peak ". At the time of the original announcement Longs Peak was presented as the first-ever comprehensive and in-depth revision of the API in the history of OpenGL. This consisted of a thorough review of the way, such as OpenGL works, what fundamental changes to the API should result. To ensure backward compatibility with older software despite the announced extensive changes and revolutionary innovations, older versions of the API should still be available, but no new features incorporated more into this. This would have allowed the old program code, as available, for example, in the majority of CAD applications - which use their code base for decades virtually unchanged - still run older versions of the OpenGL API, while other programs gradually to the new interface would have been rewritten or ported.
Longs Peak was originally to be released in September 2007 under the name OpenGL 3.0. Then, however, the Khronos Group on 30 October 2007 announced that it had identified several problem issues they wanted addressed before they published the specifications.
As a result, postponed the release, and the sources of information were silent completely. The Khronos Group was created to coordinate the development, since innovations and ideas through the numerous members could implement difficult and very time consuming. After recording its activities it sought a clear and tight schedule with clearly defined goals and devoted himself to a more open communication.
The final specifications adopted proved to be far less spectacular than advertised. Large parts of the code were still maintained and presented object mode was not integrated. Also, no plans are known, these nachzureichen in future releases. In effect, the API has remained largely the same, with a few extensions to the core functionality.
This disappointing result caused dissatisfaction among some developer groups, but one groundbreaking new features and a serious, future-oriented, platform-independent competitor to Microsoft's DirectX had hoped. In protest threatened some future switch to DirectX. Most of the disappointment you made the low to non-existent communication by Khronos ' responsible. It felt downright locked and left in the dark. Other criticism has been leveled at the necessity of DirectX 10 - capable hardware and the lack of Geometry shaders and Instanced rendering as core functions.
Other sources indicate that the reactions of the community turned out not quite as bad as originally reported, as many sellers already showed planned support for the new version.
Pros and Cons of OpenGL over Direct3D
- Client- server model
- Draw calls are more efficient than in Direct3D under certain circumstances.
- Usually better driver support for professional graphics hardware
- There are a number of extensions for new, not yet supported by the standard functions
- No OpenGL support on games consoles from Microsoft
Interfaces to the system
Since this is a pure graphics library OpenGL, she does not care about the management of drawing surfaces (window), other buffers ( such as the Z-buffer or the stencil buffer ) or rendering contexts to simultaneously use multiple applications, the interface to be able to. This must be made with the help provided for this purpose, operating system- dependent libraries.
There are here several libraries that combine OpenGL with the underlying operating system:
- AGL and CGL, the corresponding counterpart for Mac OS,
- Freeglut, a newer alternative to the no longer developed GLUT,
- GLFW, similar library like GLUT, which abstracts the underlying operating system,
- GLUT, a library that based on OpenGL, GLU, and depending on the platform GLX, WGL, or AGL a platform-independent API for Ein-/Ausgabe, create rendering contexts and the like provides,
- GLX, which forms the interface between the X Window System and OpenGL,
- With gtkglext OpenGL graphics can be embedded in GTK programs ( platform independent )
- LWJGL, an interface for programming with Java,
- Qt can create OpenGL contexts and offers many opportunities for interaction with one's own library
- SDL can also create a platform independent OpenGL context,
- SFML uses, just a platform independent OpenGL rendering context to draw on windows,
- WebKit uses OpenGL for hardware acceleration,
- WGL, the Windows graphics library OpenGL and Windows connects.
Typical applications for OpenGL
- Computer Games
- Augmented Reality
- Virtual reality
- VRML authoring
OpenGL is supported by many operating systems, including most of the leading:
- Mac OS: OpenGL is an integral part of Mac OS 9 and Mac OS X.
- Microsoft Windows: OpenGL is a component since Windows 98 and NT 4.0 (for Windows 95 was still a patch required).
- X Window System: OpenGL is supported by the X Window System on the following platforms: AIX (IBM)
- HP- UX (Hewlett -Packard)
- IRIX ( Silicon Graphics )
- Linux: OpenGL and GLX are available in most distributions.
- Solaris ( Sun Microsystems)
- Tru64 UNIX ( Hewlett -Packard)
Open Graphics Library for Embedded Systems (OpenGL ES) are available for the following platforms:
- Acorn RISC OS
- Amiga ( StormMesa ) and Amiga MiniGL
- AmigaOS MiniGL
- Apple iOS
- HP webOS
- MorphOS TinyGL
- PlayStation 3 2/PlayStation
- Pocket PC
- Xbox 360
Cross-platform (Windows, Mac OS, Solaris, and Linux) OpenGL is also supported by the additions JOGL or LWJGL of the Java platform, which act as wrappers between Java and the native implementation of the operating system.
WebGL is a building on OpenGL ES component of Web browsers that enables hardware-accelerated 3D graphics can be displayed directly.