Jump to content

OpenGL: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Replaced parens with braces to fix reference
fox baddies
Line 8: Line 8:
|latest_release_version = 4.5
|latest_release_version = 4.5
|latest_release_date = {{release date|2014|08|11}}
|latest_release_date = {{release date|2014|08|11}}
|programming language = [[C (programming language)|C]]<ref>{{cite web |url=http://www.lextrait.com/Vincent/implementations.html |title=The Programming Languages Beacon, v10.0 |first=Vincent |last =Lextrait |date=January 2010 |accessdate=14 March 2010}}</ref>
|programming language = [[C (programming language)|C]]<ref>{{cite web |url=http://www.lextrait.com/Vincent/implementations.html |title=The Programming Languages Beacon, v10.0 |first=Vincent |last =Lextrait |date=January 2010 |accessdate=14 March 2010}}</ref>
|operating_system = [[Cross-platform]]
|operating_system = [[Cross-platform]]
|platform = [[Cross-platform]]
|platform = [[Cross-platform]]
|genre = [[Application programming interface|API]]
|genre = [[Application programming interface|API]]
|license = Various<ref>{{cite web|url=http://www.sgi.com/products/software/opengl/license.html |title=Products: Software: OpenGL: Licensing and Logos |publisher=SGI |date= |accessdate=November 7, 2012}}</ref>
|license = Various<ref>{{cite web|url=http://www.sgi.com/products/software/opengl/license.html |title=Products: Software: OpenGL: Licensing and Logos |publisher=SGI |date= |accessdate=November 7, 2012}}</ref>
|website = [https://www.opengl.org/ www.opengl.org]
|website = [https://www.opengl.org/ www.opengl.org]
}}
}}


[[File:Linux kernel and OpenGL video games.svg|thumb|300px|[[Video games]] outsource real-time rendering calculations to the [[Graphics processing unit|GPU]] over OpenGL. The rendered results are not sent back, and are instead stored in a framebuffer whose content is sent to the display controller.]]
[[File:Linux kernel and OpenGL video games.svg|thumb|300px|[[Video games]] outsource real-time rendering calculations to the [[Graphics processing unit|GPU]] over OpenGL. The rendered results are not sent back, and are instead stored in a framebuffer whose content is sent to the display controller.]]


'''OpenGL''' ('''Open G'''raphics '''L'''ibrary)<ref>
'''OpenGL''' ('''Open G'''raphics '''L'''ibrary)<ref>
Line 449: Line 449:
''Release Date'': August 3, 2009
''Release Date'': August 3, 2009


OpenGL 3.2 further built on the deprecation mechanisms introduced by OpenGL 3.0, by dividing the specification into a ''core profile'' and ''compatibility profile''. Compatibility contexts include the previously-removed fixed-function APIs, equivalent to the ARB_compatibility extension released alongside OpenGL 3.1, while core contexts do not. OpenGL 3.2 also included an upgrade to GLSL version 1.50.
OpenGL 3.2 further built on the deprecation mechanisms introduced by OpenGL 3.0, by dividing the specification into a ''core profile'' and ''compatibility profile''. Compatibility contexts include the previously-removed fixed-function APIs, equivalent to the ARB_compatibility extension released alongside OpenGL 3.1, while core contexts do not. OpenGL 3.2 also included an upgrade to GLSL version 1.50.


{| class="wikitable" style="width: 100%"
{| class="wikitable" style="width: 100%"
Line 581: Line 581:


===OpenGL 4.2===
===OpenGL 4.2===
''Release Date:'' August 8, 2011<ref>{{cite web|url=http://www.khronos.org/news/press/khronos-enriches-cross-platform-3d-graphics-with-release-of-opengl-4.2-spec|title=Khronos Enriches Cross-Platform 3D Graphics with Release of OpenGL 4.2 Specification}}</ref>
''Release Date:'' August 8, 2011<ref>{{cite web|url=http://www.khronos.org/news/press/khronos-enriches-cross-platform-3d-graphics-with-release-of-opengl-4.2-spec|title=Khronos Enriches Cross-Platform 3D Graphics with Release of OpenGL 4.2 Specification}}</ref>


Supported video cards: [[GeForce 400 Series|Nvidia GeForce 400 series]], [[GeForce 500 Series|Nvidia GeForce 500 series]], [[GeForce 600 Series|Nvidia GeForce 600 series]], [[GeForce 700 Series|Nvidia GeForce 700 series]], [[Radeon HD 5000 Series|ATI Radeon HD 5000 Series]], [[Radeon HD 6000 Series|AMD Radeon HD 6000 Series]], [[Radeon HD 7000 Series|AMD Radeon HD 7000 Series]].
Supported video cards: [[GeForce 400 Series|Nvidia GeForce 400 series]], [[GeForce 500 Series|Nvidia GeForce 500 series]], [[GeForce 600 Series|Nvidia GeForce 600 series]], [[GeForce 700 Series|Nvidia GeForce 700 series]], [[Radeon HD 5000 Series|ATI Radeon HD 5000 Series]], [[Radeon HD 6000 Series|AMD Radeon HD 6000 Series]], [[Radeon HD 7000 Series|AMD Radeon HD 7000 Series]].
Line 617: Line 617:


===OpenGL 4.5===
===OpenGL 4.5===
''Release Date:'' August 11, 2014<ref>https://www.khronos.org/news/press/khronos-group-announces-key-advances-in-opengl-ecosystem</ref><ref>[http://www.opengl.org/registry/ OpenGL 4.5 API Specification (updated August 8, 2014)]</ref>
''Release Date:'' August 11, 2014<ref>https://www.khronos.org/news/press/khronos-group-announces-key-advances-in-opengl-ecosystem</ref><ref>[http://www.opengl.org/registry/ OpenGL 4.5 API Specification (updated August 8, 2014)]</ref>


Supported video cards ([[Fermi (microarchitecture)|Fermi]] and up): [[GeForce 400 series|Nvidia GeForce 400 series]] , [[GeForce 500 series|Nvidia GeForce 500 series]] , [[GeForce 600 series|Nvidia GeForce 600 series]] , [[GeForce 700 series|Nvidia GeForce 700 series]] , [[GeForce 800M series|Nvidia GeForce 800M series]] , [[GeForce 900 series|Nvidia GeForce 900 series]] as well as the [[Tegra K1]] and Tegra X1.<ref>http://www.ustream.tv/recorded/51255959</ref><ref>http://www.slideshare.net/Mark_Kilgard/opengl-45-update-for-nvidia-gpus</ref>
Supported video cards ([[Fermi (microarchitecture)|Fermi]] and up): [[GeForce 400 series|Nvidia GeForce 400 series]] , [[GeForce 500 series|Nvidia GeForce 500 series]] , [[GeForce 600 series|Nvidia GeForce 600 series]] , [[GeForce 700 series|Nvidia GeForce 700 series]] , [[GeForce 800M series|Nvidia GeForce 800M series]] , [[GeForce 900 series|Nvidia GeForce 900 series]] as well as the [[Tegra K1]] and Tegra X1.<ref>http://www.ustream.tv/recorded/51255959</ref><ref>http://www.slideshare.net/Mark_Kilgard/opengl-45-update-for-nvidia-gpus</ref>


* Direct State Access (DSA) – object accessors enable state to be queried and modified without binding objects to contexts, for increased application and middleware efficiency and flexibility.<ref>http://arstechnica.com/information-technology/2014/08/opengl-4-5-released-with-one-of-direct3ds-best-features/</ref>
* Direct State Access (DSA) – object accessors enable state to be queried and modified without binding objects to contexts, for increased application and middleware efficiency and flexibility.<ref>http://arstechnica.com/information-technology/2014/08/opengl-4-5-released-with-one-of-direct3ds-best-features/</ref>

Revision as of 14:12, 6 February 2015

OpenGL
Original author(s)Silicon Graphics
Developer(s)
Initial releaseJanuary 1992 (1992-01)
Stable release
4.5 / August 11, 2014 (2014-08-11)
Written inC[1]
Operating systemCross-platform
PlatformCross-platform
TypeAPI
LicenseVarious[2]
Websitewww.opengl.org
Video games outsource real-time rendering calculations to the GPU over OpenGL. The rendered results are not sent back, and are instead stored in a framebuffer whose content is sent to the display controller.

OpenGL (Open Graphics Library)[3][4][5] is a cross-language, multi-platform application programming interface (API) for rendering 2D and 3D vector graphics. The API is typically used to interact with a graphics processing unit (GPU), to achieve hardware-accelerated rendering.

Silicon Graphics Inc. (SGI) started developing OpenGL in 1991 and released it in January 1992;[6] applications use it extensively in the fields of CAD, virtual reality, scientific visualization, information visualization, flight simulation, and video games. OpenGL is managed by the non-profit technology consortium Khronos Group.

Design

An illustration of the graphics pipeline process

The OpenGL specification describes an abstract API for drawing 2D and 3D graphics. Although it is possible for the API to be implemented entirely in software, it is designed to be implemented mostly or entirely in hardware.

The API is defined as a number of functions which may be called by the client program, alongside a number of named integer constants (for example, the constant GL_TEXTURE_2D, which corresponds to the decimal number 3553). Although the function definitions are superficially similar to those of the C programming language, they are language-independent. As such, OpenGL has many language bindings, some of the most noteworthy being the JavaScript binding WebGL (API, based on OpenGL ES 2.0, for 3D rendering from within a web browser); the C bindings WGL, GLX and CGL; the C binding provided by iOS; and the Java and C bindings provided by Android.

In addition to being language-independent, OpenGL is also platform-independent. The specification says nothing on the subject of obtaining, and managing, an OpenGL context, leaving this as a detail of the underlying windowing system. For the same reason, OpenGL is purely concerned with rendering, providing no APIs related to input, audio, or windowing.

Development

OpenGL is an evolving API. New versions of the OpenGL specifications are regularly released by the Khronos Group, each of which extends the API to support various new features. The details of each version are decided by consensus between the Group's members, including graphics card manufacturers, operating system designers, and general technology companies such as Mozilla and Google.[7]

In addition to the features required by the core API, GPU vendors may provide additional functionality in the form of extensions. Extensions may introduce new functions and new constants, and may relax or remove restrictions on existing OpenGL functions. Vendors can use extensions to expose custom APIs without needing support from other vendors or the Khronos Group as a whole, which greatly increases the flexibility of OpenGL. All extensions are collected in, and defined by, the OpenGL Registry.

Each extension is associated with a short identifier, based on the name of the company which developed it. For example, Nvidia's identifier is NV, which is part of the extension name GL_NV_half_float, the constant GL_HALF_FLOAT_NV, and the function glVertex2hNV().[8] If multiple vendors agree to implement the same functionality using the same API, a shared extension may be released, using the identifier EXT. In such cases, it could also happen that the Khronos Group's Architecture Review Board gives the extension their explicit approval, in which case the identifier ARB is used.[9]

The features introduced by each new version of OpenGL are typically formed from the combined features of several widely-implemented extensions, especially extensions of type ARB or EXT.

Documentation

OpenGL's popularity is partially due to the quality of its official documentation. The OpenGL Architecture Review Board released a series of manuals along with the specification which have been updated to track changes in the API. These are almost universally known by the colors of their covers:

The Red Book
OpenGL Programming Guide, 8th Edition. ISBN 0-321-77303-9
A tutorial and reference book.
The Orange Book
OpenGL Shading Language, 3rd edition. ISBN 0-321-63763-1
A tutorial and reference book for GLSL.

Historic books (pre-OpenGL 2.0):

The Green Book
OpenGL Programming for the X Window System. ISBN 0-201-47334-5
A book about X11 interfacing and GLUT.
The Blue Book
OpenGL Reference manual, 4th edition. ISBN 0-321-17383-X
Essentially a hard-copy printout of the man pages for OpenGL.
Includes a poster-sized fold-out diagram showing the structure of an idealised OpenGL implementation.
The Alpha Book (white cover)
OpenGL Programming for Windows 95 and Windows NT. ISBN 0-201-40709-4
A book about interfacing OpenGL with Microsoft Windows.

Associated libraries

The earliest versions of OpenGL were released with a companion library called GLU, the OpenGL Utility Library. It provided simple, useful features which were unlikely to be supported in contemporary hardware, such as mipmap generation, tessellation, and generation of primitive shapes. The GLU specification was last updated in 1998, and the latest version depends on features which were deprecated with the release of OpenGL 3.1 in 2009.[10]

Context and window toolkits

Given that creating an OpenGL context is quite a complex process, and given that it varies between operating systems, automatic OpenGL context creation has become a common feature of several game-development and user-interface libraries, including SDL, Allegro, SFML, FLTK, and Qt. A few libraries have been designed solely to produce an OpenGL-capable window. The first such library was GLUT (later superseded by freeglut). GLFW is a newer alternative.[11]

  • These toolkits are designed specifically around creating and managing OpenGL windows. They also manage input, but little beyond that.[12]
  • GLFW — A crossplatform windowing and keyboard/mouse/joystick handler. Is more aimed for creating games.
  • freeglut — A crossplatform windowing and keyboard/mouse handler. Its API is a superset of the GLUT API, and it is more stable and up to date than GLUT.
  • GLUT — Very old, do not use.
  • Several "multimedia libraries" can create OpenGL windows, in addition to input, sound and other tasks useful for game-like applications.
  • Allegro 5 — A cross-platform multimedia library with a C API focused on game development.
  • SDL — A cross-platform multimedia library with a C API.
  • SFML — A cross-platform multimedia library with a C++ API.
  • Widget toolkits
  • FLTK — A small cross-platform C++ widget library.
  • Qt — A cross-platform C++ widget toolkit. It provides a number of OpenGL helper objects, which even abstract away the difference between desktop GL and OpenGL ES.
  • wxWidgets — A cross-platform C++ widget toolkit.

Extension loading libraries

Given the high workload involved in identifying and loading OpenGL extensions, a few libraries have been designed which load all available extensions and functions automatically. Examples include GLEE, GLEW and glbinding. Extensions are also loaded automatically by most language bindings, such as JOGL and PyOpenGL.

Implementations

Mesa 3D is an open source implementation of OpenGL. It can do pure software rendering, and it may also use hardware acceleration on the Linux platform by taking advantage of the Direct Rendering Infrastructure. As of version 10.0, it implements version 3.3 of the OpenGL standard.[13]

History

In the 1980s, developing software that could function with a wide range of graphics hardware was a real challenge. Software developers wrote custom interfaces and drivers for each piece of hardware. This was expensive and resulted in multiplication of effort.

By the early 1990s, SGI was a leader in 3D graphics for workstations. Their IRIS GL API[14] was considered state-of-the-art and became the de facto industry standard, overshadowing the open standards-based PHIGS. This was because IRIS GL was considered easier to use, and because it supported immediate mode rendering. By contrast, PHIGS was considered difficult to use and outdated in terms of functionality.

SGI's competitors (including Sun Microsystems, Hewlett-Packard and IBM) were also able to bring to market 3D hardware, supported by extensions made to the PHIGS standard. This in turn caused SGI market share to weaken as more 3D graphics hardware suppliers entered the market. In an effort to influence the market, SGI decided to turn the IrisGL API into an open standard - OpenGL.

However, SGI had a large number of software customers for whom the change from IrisGL to OpenGL would require significant investment. Moreover, IrisGL had API functions that were not relevant to 3D graphics. For example, it included a windowing, keyboard and mouse API, in part because it was developed before the X Window System and Sun's NeWS systems were developed. And, IrisGL libraries were unsuitable for opening due to licensing and patent issues. These factors required SGI to continue to support the advanced and proprietary Iris Inventor and Iris Performer programming APIs while market support for OpenGL matured.

One of the restrictions of IrisGL was that it only provided access to features supported by the underlying hardware. If the graphics hardware did not support a feature, then the application could not use it. OpenGL overcame this problem by providing support in software for features unsupported by hardware, allowing applications to use advanced graphics on relatively low-powered systems. OpenGL standardized access to hardware, pushed the development responsibility of hardware interface programs (sometimes called device drivers) to hardware manufacturers, and delegated windowing functions to the underlying operating system. With so many different kinds of graphics hardware, getting them all to speak the same language in this way had a remarkable impact by giving software developers a higher level platform for 3D-software development.

In 1992,[15] SGI led the creation of the OpenGL Architecture Review Board (OpenGL ARB), the group of companies that would maintain and expand the OpenGL specification in the future.

In 1994, SGI played with the idea of releasing something called "OpenGL++" which included elements such as a scene-graph API (presumably based on their Performer technology). The specification was circulated among a few interested parties – but never turned into a product.[16]

Microsoft released Direct3D in 1995, which eventually became the main competitor of OpenGL. On December 17, 1997,[17] Microsoft and SGI initiated the Fahrenheit project, which was a joint effort with the goal of unifying the OpenGL and Direct3D interfaces (and adding a scene-graph API too). In 1998, Hewlett-Packard joined the project.[18] It initially showed some promise of bringing order to the world of interactive 3D computer graphics APIs, but on account of financial constraints at SGI, strategic reasons at Microsoft, and general lack of industry support, it was abandoned in 1999.[19]

In July 2006 the OpenGL Architecture Review Board voted to transfer control of the OpenGL API standard to the Khronos Group.[20][21]

Version history

The first version of OpenGL, version 1.0, was released in January 1992 by Mark Segal and Kurt Akeley. Since then, OpenGL has occasionally been extended by releasing a new version of the specification. Such releases define a baseline set of features which all conforming graphics cards must support, and against which new extensions can more easily be written. Each new version of OpenGL tends to incorporate a number of extensions which have widespread support among graphics-card vendors, although the details of those extensions may be changed.

OpenGL 1.1

Release Date: March 4, 1997

Extension Details
EXT_vertex_array Multiple vertices may be passed to the GL with a single function call.
EXT_polygon_offset Depth values may be offset on a per-primitive basis.
EXT_blend_logic_op Fragment colors may be blended into the framebuffer using bitwise operations.
EXT_texture Various texturing improvements, including proxy textures and sized internal formats.
EXT_copy_texture
EXT_subtexture
Various methods to alter texture images, including image copying and sub-image replacement.
EXT_texture_object Texture state may be stored in a GL object, for greater efficiency.

OpenGL 1.2

Release Date: March 16, 1998

One notable feature of OpenGL 1.2 was the introduction of the imaging subset. This is a set of features which are very useful to image-processing applications, but which have limited usefulness elsewhere. Implementation of this subset has always been optional; support is indicated by advertising the extension string ARB_imaging.

Extension Details
EXT_texture3D Three-dimensional texturing.
EXT_bgra Pixel data may be specified in BGR or BGRA order, to match the pixel format of Windows bitmaps.
EXT_packed_pixels Pixel data may be "packed" into a larger primitive type. For example, all four components of an RGBA pixel may be specified as a single 32-bit integer.
EXT_rescale_normal Normals may be automatically rescaled by the GL, which in some cases removes the need for an expensive normalization.
EXT_separate_specular_color The GL's lighting capabilities are extended to support texture-independent specular highlighting.
SGIS_texture_edge_clamp A new texture-coordinate clamping mode which, unlike GL_CLAMP, will never sample from the texture's border.
SGIS_texture_lod The programmer is given greater control over the level-of-detail calculation used to select a texture's mipmap.
EXT_draw_range_elements The DrawRangeElements function; a slightly more performant alternative to DrawElements.

OpenGL 1.2.1

Release Date: October 14, 1998

Opengl 1.2.1 was a minor release, appearing only seven months after the release of version 1.2. It introduced the concept of ARB extensions, and defined the extension ARB_multitexture, without yet incorporating it into the OpenGL core specification.

OpenGL 1.3

Release Date: August 14, 2001

Extension Details
ARB_texture_compression A standard framework upon which compressed texture formats may be supported, without requiring any actual compression support.
ARB_texture_cube_map Cube-mapped texturing.
ARB_multisample A standard framework upon which multisample anti-aliasing may be supported, without requiring any actual MSAA support.
ARB_multitexture Color values from several textures at once may be blended onto a single fragment.
ARB_texture_env_add
ARB_texture_env_combine
ARB_texture_env_dot3
Several new "texture environment functions": mechanisms for blending texture colors onto fragment colors.
ARB_texture_border_clamp A new texture-coordinate clamping mode which forces out-of-bounds texture coordinates to sample from the texture's border.
ARB_transpose_matrix Transformation matrices may be specified in either row-major order or column-major order.

OpenGL 1.4

Release date: July 24, 2002

Extension Details
SGIS_generate_mipmap Texture mipmaps may be generated automatically by the GL.
NV_blend_square RGB and Alpha values may be squared during alpha-blending.
EXT_blend_color
EXT_blend_minmax
EXT_blend_subtract
Various ways to customize the blend equation, promoted from the optional imaging subset (introduced in version 1.2) to the core specification.
ARB_depth_texture
ARB_shadow
Textures which store depth values, rather than color values. Such textures are useful for shadow-casting and displacement maps.
EXT_fog_coord A way to customize the fog intensity on a per-vertex basis.
EXT_multi_draw_arrays A set of APIs which emulate multiple calls to DrawArrays or DrawElements, in a single function call. In some cases, this may be more efficient.
ARB_point_parameters Greater control over the rasterization of point primitives.
EXT_secondary_color The "secondary color" mechanism defined by EXT_separate_specular_color may be used in all circumstances, even when lighting is disabled.
EXT_blend_func_separate Separate blending functions may be specified for the RGB and Alpha components of the blended pixels.
EXT_stencil_wrap A stencil mode which causes stencil values to increment with wrapping.
ARB_texture_env_crossbar Texture environment functions may access all other texture stages, rather than being restricted to the texture bound to their own texture unit.
ARB_texture_mirrored_repeat A new texture-coording wrapping mode which causes the texture image to be horizontally or vertically mirrored.
ARB_window_pos The WindowPos API, an alternative to RasterPos which sets the raster-output position in screen space rather than world space.

OpenGL 1.5

Release Date: July 29, 2003

Alongside the release of OpenGL 1.5, the ARB released the OpenGL Shading Language specification, and the extensions ARB_shader_objects, ARB_vertex_shader, and ARB_fragment_shader. However, these would not be incorporated into the core specification until the next release.

Extension Details
ARB_vertex_buffer_object A new type of GL object, the "buffer", which stores various types of data (especially vertex data) in high-performance video memory.
ARB_occlusion_query The programmer may query whether or not a primitive was occluded during rendering.
EXT_shadow_funcs The capabilities of the ARB_shadow extension are slightly extended.

OpenGL 2.0

Release Date: September 7, 2004

OpenGL 2.0 was originally conceived by 3Dlabs to address concerns that OpenGL was stagnating and lacked a strong direction.[22] 3Dlabs proposed a number of major additions to the standard. Most of these were, at the time, rejected by the ARB or otherwise never came to fruition in the form that 3Dlabs proposed. However, their proposal for a C-style shading language was eventually completed, resulting in the current formulation of GLSL (the OpenGL Shading Language, also slang). Like the assembly-like shading languages that it was replacing, it allowed the programmer to replace the fixed-function vertex and fragment pipe with shaders, though this time written in a C-like high-level language.

The design of GLSL was notable for making relatively few concessions to the limitations of the hardware then available; this hearkened back to the earlier tradition of OpenGL setting an ambitious, forward-looking target for 3D accelerators rather than merely tracking the state of currently available hardware. The final OpenGL 2.0 specification[23] includes support for GLSL.

Extension Details
ARB_shading_language_100
ARB_shader_objects
ARB_vertex_shader
ARB_fragment_shader
The high-level OpenGL Shading Language, which provides direct access to programmable vertex and fragment processors.
ARB_draw_buffers Fragment shaders may output different colors to multiple render-targets in a single pass. (Note that actual support for multiple render-targets would not be guaranteed until OpenGL 3.0.)
ARB_texture_non_power_of_two Texture images may have non-power-of-two dimensions.
ARB_point_sprite Points may be rendered as small, screen-oriented texture quads. This is useful when developing particle systems.
EXT_blend_equation_separate Separate blending equations may be specified for the RGB and Alpha components of the blended pixels. Similar to EXT_blend_func_separate.
ATI_separate_stencil
EXT_stencil_two_side
Separate stencil algorithms may be used when rendering the front and back faces of primitives.

OpenGL 2.1

Release Date: July 2, 2006

OpenGL 2.1 required implementations to support version 1.20 of the OpenGL Shading Language.

Extension Details
ARB_pixel_buffer_object Buffer objects may be used for asynchronous transfers of image data.
EXT_texture_sRGB Texture pixel values may be specified in the gamma-corrected sRGB color space.

Longs Peak and OpenGL 3.0 controversy

Prior to the release of OpenGL 3.0, the new revision was known as the codename Longs Peak. At the time of its original announcement, Longs Peak was presented as the first major API revision in OpenGL's lifetime. It consisted of an overhaul to the way that OpenGL works, calling for fundamental changes to the API.

The draft introduced a change to object management. The GL 2.1 object model was built upon the state-based design of OpenGL. That is, in order to modify an object or to use it, one needs to bind the object to the state system, then make modifications to the state or perform function calls that use the bound object.

Because of OpenGL's use of a state system, objects must be mutable. That is, the basic structure of an object can change at any time, even if the rendering pipeline is asynchronously using that object. A texture object can be redefined from 2D to 3D. This requires any OpenGL implementations to add a degree of complexity to internal object management.

Under the Longs Peak API, object creation would become atomic, using templates to define the properties of an object which would be created with a single function call. The object could then be used immediately across multiple threads. Objects would also be immutable; however, they could have their contents changed and updated. For example, a texture could change its image, but its size and format could not be changed.

To support backwards compatibility, the old state based API would still be available, but no new functionality would be exposed via the old API in later versions of OpenGL. This would have allowed legacy code bases, such as the majority of CAD products, to continue to run while other software could be written against or ported to the new API.

Longs Peak was initially due to be finalized in September 2007 under the name OpenGL 3.0, but the Khronos Group announced on October 30 that it had run into several issues that it wished to address before releasing the specification.[24] As a result, the spec was delayed, and the Khronos Group went into a media blackout until the release of the final OpenGL 3.0 spec.

The final specification proved far less revolutionary than the Longs Peak proposal. Instead of removing all immediate mode and fixed functionality (non-shader mode), the spec included them as deprecated features. The proposed object model was not included, and no plans have been announced to include it in any future revisions. As a result, the API remained largely the same with a few existing extensions being promoted to core functionality.

Among some developer groups this decision caused something of an uproar,[25] with many developers professing that they would switch to DirectX in protest. Most complaints revolved around the lack of communication by Khronos to the development community and multiple features being discarded that were viewed favorably by many. Other frustrations included the requirement of DirectX 10 level hardware in order to use OpenGL 3.0 and the absence of geometry shaders and instanced rendering as core features.

Other sources reported that the community reaction was not quite as severe as originally presented,[26] with many vendors showing support for the update.[27][28]

OpenGL 3.0

Release Date: August 11, 2008

OpenGL 3.0 introduced a deprecation mechanism to simplify future revisions of the API. Certain features, marked as deprecated, could be completely disabled by requesting a forward-compatible context from the windowing system. OpenGL 3.0 features could still be accessed alongside these deprecated features, however, by requesting a full context.

Deprecated features include:

  • All fixed-function vertex and fragment processing.
  • Direct-mode rendering, using glBegin and glEnd.
  • Display lists.
  • Indexed-color rendering targets.
  • OpenGL Shading Language versions 1.10 and 1.20.
Extension Details
EXT_gpu_shader4 API functions required by version 1.30 of the OpenGL Shading Language.
ARB_map_buffer_range Mapping of buffer subranges into client space and flushing modified data.
ARB_color_buffer_float
NV_depth_buffer_float
ARB_texture_float
EXT_packed_float
EXT_texture_shared_exponent
Floating-point color and depth internal formats for textures and renderbuffers.
ARB_half_float_pixel
NV_half_float
Half-float (16-bit) vertex array and pixel data formats.
EXT_framebuffer_object A new type of GL object, the "framebuffer". Framebuffers enable offscreen rendering and rendering to textures.
EXT_framebuffer_sRGB Use of the sRGB gamma-corrected image data in framebuffers.
EXT_framebuffer_blit
EXT_framebuffer_multisample
Functions to perform a fast blit from one render-target to another.
ARB_texture_float
EXT_texture_integer
Support for floating-point and non-normalized integer texture storage.
EXT_packed_depth_stencil Packed depth/stencil internal formats for combined depth+stencil textures and renderbuffers.
EXT_draw_buffers2 Per-color-attachment blend enables and color writemasks.
GL_EXT_texture_array One- and two-dimensional layered texture targets.
EXT_texture_compression_rgtc The RGTC texture-compression format, for compressing one or two-channels of image data.
EXT_transform_feedback The results of vertex processing can be captured into buffers, rather than (or in addition to) being passed to the rest of the pipeline.
ARB_vertex_array_object A new type of GL object, the "vertex array object", which stores a set of bindings to vertex arrays. This allows vertex arrays to be rebound with a single function call rather than several calls to EnableVertexAttribArray, VertexAttribPointer, etc.
NV_conditional_render Conditional rendering, based on the results of an occlusion query.

OpenGL 3.1

Release Date: March 24, 2009

OpenGL 3.1 fully removed all of the features which were deprecated in version 3.0, with the exception of wide lines. From this version onwards, it's not possible to access new features using a full context, or to access deprecated features using a forward-compatible context. An exception to the former rule is made if the implementation supports the ARB_compatibility extension, but this is not guaranteed.

Extension Details
ARB_draw_instanced Instanced rendering: the ability to quickly render the same geometry data multiple times, with the vertex shader being given information specifying which instance it is operating on.
EXT_copy_buffer A mechanism to copy data directly from one buffer object to another.
ARB_texture_buffer_object Buffer textures: one-dimensional textures, where the pixel data store comes from a buffer object.
ARB_texture_rectangle Rectangular textures.
ARB_uniform_buffer_object The ability to store a set of shader parameters in a buffer object.
NV_primitive_restart The ability to specify that an index restarts a primitive, so that objects can be called with fewer calls to DrawElements.

OpenGL 3.2

Release Date: August 3, 2009

OpenGL 3.2 further built on the deprecation mechanisms introduced by OpenGL 3.0, by dividing the specification into a core profile and compatibility profile. Compatibility contexts include the previously-removed fixed-function APIs, equivalent to the ARB_compatibility extension released alongside OpenGL 3.1, while core contexts do not. OpenGL 3.2 also included an upgrade to GLSL version 1.50.

Extension Details
ARB_geometry_shader4 (heavily modified) Geometry shaders.
ARB_sync A set of GL objects representing synchronization primitives, which allow the client to detect when a specific set of tasks has completed.
ARB_vertex_array_bgra Per-vertex color data may be specified in BGRA order, matching the convention used by Direct3D.
ARB_draw_elements_base_vertex The DrawElements API is extended to automatically add a numerical offset (the "base vertex") to each array index.
ARB_seamless_cube_map Forces blending between different faces when sampling from a cube map.
ARB_texture_multisample A new type of texture, which can be used as a multisampled render target.
ARB_fragment_coord_conventions Allow fragment shaders to read fragment coordinate locations in the same conventions as Direct3D.
ARB_provoking_vertex The developer may configure which vertex determines the properties for flat-shaded vertex components.
ARB_depth_clamp The developer may configure whether or not triangles are clipped against the near/far Z range.

OpenGL 3.3

Release Date: March 11, 2010

OpenGL 3.3 was released alongside version 4.0. It was designed to target hardware capable of supporting Direct3D 10.

Extension Details
ARB_shader_bit_encoding Adds shading language functions to perform conversions from/to floating-point and integers. This extension only affects the shading language.
ARB_blend_func_extended Fragment shaders can output multiple colors that can be used in a single blending operation.
ARB_explicit_attrib_location Shader inputs and outputs may be assigned resource locations in the shader.
ARB_occlusion_query2 The occlusion-query system is extended to support querying whether entire objects were occluded, rather than querying the exact number of occluded pixels. In some cases, this may be more efficient.
ARB_sampler_objects A new GL object which wraps some texture object state, such as interpolation and clamping. This allows a single texture to be simultaneously accessed in multiple ways.
ARB_texture_swizzle The developer may configure the order that the components in a texture are presented to a shader when it samples them.
ARB_timer_query Functions to accurately measure the time taken by an operation. This information is useful for profiling purposes.
ARB_instanced_arrays When performing instanced rendering, instances may be configured using per-instance vertex attributes rather than using a vertex shader parameter to access an array.
ARB_texture_rgb10_a2ui
ARB_vertex_type_2_10_10_10_rev
Image and vertex data may be specified by packing three 10-bit normalized integer values into a single 32-bit integer.

OpenGL 4.0

Release Date: March 11, 2010

OpenGL 4.0 was released alongside version 3.3. It was designed to target hardware capable of supporting Direct3D 11.

As in OpenGL 3.0, this version of OpenGL contains a high number of fairly inconsequential extensions, designed to thoroughly expose the capabilities of Direct3D 11-class hardware. Only the most influential extensions are listed below.

Extension Details
ARB_tessellation_shader Two new shader stages (tessellation-control and tessellation-evaluation) to support efficient generation of geometry on the GPU.
ARB_shader_subroutine The ability to call different subroutines within a shader dynamically, without recompiling the source.
ARB_sample_shading The programmer may request that a fragment program is evaluated for each sample within a fragment, which increases the fidelity of multisampled anti-aliasing.
ARB_draw_buffers_blend The ability to set individual blend equations and blend functions for each color output.
ARB_draw_indirect A mechanism to supply the arguments to certain Draw functions from buffer-object memory. Combined with transform feedback or OpenCL, this allows the GPU to render without synchronising with the CPU.
ARB_transform_feedback2
ARB_transform_feedback3
A set of improvements to EXT_transform_feedback.

OpenGL 4.1

Release Date: July 26, 2010

Extension Details
ARB_ES2_compatibility Full API compatibility with OpenGL ES 2.0.
ARB_get_program_binary The ability to retrieve the content of program objects in a binary, vendor-specific format. This eliminates the need to recompile shaders whenever the program is run, but the resulting binaries are not transferable from one GPU to another.
ARB_separate_shader_objects Program objects may be separately associated with each of the five shading stages, instead of using separate shader stages linked into a monolithic program object.
ARB_viewport_array The ability to define multiple viewports and scissor rectangles, to be used when generating several scenes at once from a geometry shader.
ARB_vertex_attrib_64bit Vertex attributes can be double-precision values.
ARB_shader_precision The ability to specify the precision of certain operations in the shading language.

OpenGL 4.2

Release Date: August 8, 2011[29]

Supported video cards: Nvidia GeForce 400 series, Nvidia GeForce 500 series, Nvidia GeForce 600 series, Nvidia GeForce 700 series, ATI Radeon HD 5000 Series, AMD Radeon HD 6000 Series, AMD Radeon HD 7000 Series. Supported by Intel's Windows drivers for the Haswell's integrated GPU.[30]

  • Support for shaders with atomic counters and load/store/atomic read-modify-write operations to a single level of a texture.
  • Drawing multiple instances of data captured from GPU vertex processing (including tessellation), to enable complex objects to be efficiently repositioned and replicated.
  • Support for modifying an arbitrary subset of a compressed texture, without having to re-download the whole texture to the GPU for significant performance improvements.

OpenGL 4.3

Release Date: August 6, 2012[31]

Supported video cards: Nvidia GeForce 400 series, Nvidia GeForce 500 series, Nvidia GeForce 600 series, Nvidia GeForce 700 series, ATI Radeon HD 5000 Series, AMD Radeon HD 6000 Series, AMD Radeon HD 7000 Series, AMD Radeon HD 8000 Series

  • Compute shaders leveraging GPU parallelism within the context of the graphics pipeline
  • Shader storage buffer objects, allowing shaders to read and write buffer objects like image load/store from 4.2, but through the language rather than function calls.
  • Image format parameter queries
  • ETC2/EAC texture compression as a standard feature
  • Full compatibility with OpenGL ES 3.0 APIs
  • Debug capabilities to receive debugging messages during application development
  • Texture views for interpreting textures in different ways without data replication
  • Increased memory security and multi-application robustness

OpenGL 4.4

Release Date: July 22, 2013[32]

Supported video cards: Nvidia GeForce 400 series, Nvidia GeForce 500 series, Nvidia GeForce 600 series, Nvidia GeForce 700 series, and Nvidia GeForce 800M series, AMD Radeon HD 5000 Series, AMD Radeon HD 6000 Series, AMD Radeon HD 7000 Series, AMD Radeon HD 8000 Series and AMD Radeon Rx 200 Series.

Supported SoC: Tegra K1

  • Enforced buffer object usage controls
  • Asynchronous queries into buffer objects
  • Expression of more layout controls of interface variables in shaders
  • Efficient binding of multiple objects simultaneously

OpenGL 4.5

Release Date: August 11, 2014[33][34]

Supported video cards (Fermi and up): Nvidia GeForce 400 series , Nvidia GeForce 500 series , Nvidia GeForce 600 series , Nvidia GeForce 700 series , Nvidia GeForce 800M series , Nvidia GeForce 900 series as well as the Tegra K1 and Tegra X1.[35][36]

  • Direct State Access (DSA) – object accessors enable state to be queried and modified without binding objects to contexts, for increased application and middleware efficiency and flexibility.[37]
  • Flush Control - applications can control flushing of pending commands before context switching – enabling high-performance multithreaded applications;
  • Robustness - providing a secure platform for applications such as WebGL browsers, including preventing a GPU reset affecting any other running applications;
  • OpenGL ES 3.1 API and shader compatibility – to enable the easy development and execution of the latest OpenGL ES applications on desktop systems;

OpenGL NG

This is a codename given by journalists to a grounds-up redesign effort (semi-officially called "The Next Generation OpenGL Initiative"), to unify OpenGL and OpenGL ES into one common API that will not be backwards compatible with existing OpenGL versions.[38][39][40] AMD has offered its Mantle API without any conditions and for free as the base of the next generation of OpenGL.[41]

Sample renderings

See also

References

  1. ^ Lextrait, Vincent (January 2010). "The Programming Languages Beacon, v10.0". Retrieved March 14, 2010.
  2. ^ "Products: Software: OpenGL: Licensing and Logos". SGI. Retrieved November 7, 2012.
  3. ^ https://www.opengl.org/wiki/Main_Page
  4. ^ "OpenGL 4.0 Specification" (PDF). Retrieved May 2, 2013.
  5. ^ http://faculty.ycp.edu/~dbabcock/PastCourses/cs370/labs/index.html
  6. ^ "SGI – OpenGL Overview".
  7. ^ "Khronos Membership Overview and FAQ". Khronos.org. Retrieved November 7, 2012.
  8. ^ http://www.opengl.org/registry/specs/NV/half_float.txt
  9. ^ "How to Create Khronos API Extensions". Opengl.org. August 13, 2006. Retrieved November 7, 2012.
  10. ^ "The OpenGL Registry". Opengl.org. Retrieved May 2, 2013.
  11. ^ "A list of GLUT alternatives, maintained by". Opengl.org. Retrieved May 2, 2013.
  12. ^ "Related toolkits and APIs". www.opengl.org. OpenGL. Retrieved October 8, 2014.
  13. ^ "Mesa 10.0 Release Notes". mesa3d.org. November 30, 2013. Retrieved December 5, 2013.
  14. ^ "IRIS GL, SGI's property".
  15. ^ "Creation of the OpenGL ARB".
  16. ^ "End of OpenGL++". opengl.org.
  17. ^ "Announcement of Fahrenheit".
  18. ^ "Members of Fahrenheit. 1998". Computergram International. 1998.
  19. ^ "End of Fahrenheit".
  20. ^ OpenGL ARB to pass control of OpenGL specification to Khronos Group, Khronos press release
  21. ^ OpenGL ARB to Pass Control of OpenGL Specification to Khronos Group, AccessMyLibrary Archive
  22. ^ Fedy Abi-Chahla (September 16, 2008). "OpenGL 3 (3DLabs And The Evolution Of OpenGL)". Tom's Hardware. Retrieved October 24, 2010.
  23. ^ http://www.opengl.org/documentation/specs/version2.0/glspec20.pdf
  24. ^ "OpenGL ARB announces an update on OpenGL 3.0". October 30, 2007. Retrieved October 31, 2007.
  25. ^ "OpenGL 3.0 Released, Developers Furious – Slashdot". Tech.slashdot.org. Retrieved November 7, 2012.
  26. ^ "OpenGL BOF went over well, no pitch forks seen".
  27. ^ "The Industry Standard for High Performance Graphics". OpenGL. August 18, 2008. Retrieved November 7, 2012.
  28. ^ "NVIDIA provides early OpenGL 3.0 driver now".
  29. ^ "Khronos Enriches Cross-Platform 3D Graphics with Release of OpenGL 4.2 Specification".
  30. ^ "Intel Releases OpenGL 4.2 drivers for Haswell".
  31. ^ "Khronos Releases OpenGL 4.3 Specification with Major Enhancements".
  32. ^ "Khronos Releases OpenGL 4.4 Specification".
  33. ^ https://www.khronos.org/news/press/khronos-group-announces-key-advances-in-opengl-ecosystem
  34. ^ OpenGL 4.5 API Specification (updated August 8, 2014)
  35. ^ http://www.ustream.tv/recorded/51255959
  36. ^ http://www.slideshare.net/Mark_Kilgard/opengl-45-update-for-nvidia-gpus
  37. ^ http://arstechnica.com/information-technology/2014/08/opengl-4-5-released-with-one-of-direct3ds-best-features/
  38. ^ "Khronos Announces Next Generation OpenGL Initiative". AnandTech. Retrieved August 20, 2014.
  39. ^ "OpenGL 4.5 released, next-gen OpenGL unveiled: Cross-platform Mantle killer, DX12 competitor". Retrieved August 20, 2014.
  40. ^ "Khronos Publishes Its Slides About OpenGL-Next". Phoronix. Retrieved August 22, 2014.
  41. ^ "AMD hopes to put a little Mantle in OpenGL Next". techreport.

Further reading

  • Dave Shreiner, The Khronos OpenGL ARB Working Group: OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 4.3 (8th Edition), Addison-Wesley, March 30, 2013, ISBN 978-0-321-77303-6
  • Graham Sellers, Richard S. Wright, Nicholas Haemel: OpenGL SuperBible: Comprehensive Tutorial and Reference (6th Edition), Addison-Wesley, July 31, 2013, ISBN 978-0-321-90294-8
  • Rost, Randi J.: OpenGL Shading Language (3rd Edition), Addison-Wesley, July 30, 2009, ISBN 978-0-321-63763-5
  • Lengyel, Eric: The OpenGL Extensions Guide, Charles River Media, ISBN 1-58450-294-0
  • OpenGL Architecture Review Board, et al.: OpenGL Reference Manual: The Official Reference Document to OpenGL, Version 1.4, Addison-Wesley, ISBN 0-321-17383-X
  • OpenGL Architecture Review Board, et al.: OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 2, Fifth Edition, Addison-Wesley, ISBN 0-321-33573-2

Examples