Jump to content

OpenGL

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 95.144.193.189 (talk) at 14:00, 22 September 2012 (See also). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

OpenGL
Original author(s)Silicon Graphics
Developer(s)Khronos Group
Stable release
4.3[1] / August 6, 2012 (2012-08-06)
Written inC
Operating systemCross-platform
PlatformCross-platform
TypeAPI
LicenseVarious[2]
Websitewww.opengl.org

OpenGL (Open Graphics Library)[3] is a standard specification defining a cross-language, multi-platform API for writing applications and simulating physics, that produce 2D and 3D computer graphics. The interface consists of over 250 different function calls which can be used to draw complex three-dimensional scenes from simple primitives. OpenGL was developed by Silicon Graphics Inc. (SGI) in 1992[4] and is widely used in CAD, virtual reality, scientific visualization, information visualization, flight simulation, and video games. OpenGL is managed by the non-profit technology consortium Khronos Group.

Design

OpenGL serves two main purposes:

  1. It presents a single, uniform interface for different 3D accelerator hardware.
  2. It supports the full OpenGL feature set, using software emulation if necessary, for all implementations.

In its basic operation, OpenGL accepts primitives such as points, lines and polygons, and converts them into pixels via a graphics pipeline known as the OpenGL state machine. Most OpenGL commands either issue primitives to the graphics pipeline, or configure how the pipeline processes these primitives. Prior to the introduction of OpenGL 2.0, each stage of the pipeline performed a fixed function and was configurable only within tight limits. OpenGL 2.0 offers several stages that are fully programmable using GLSL.

OpenGL is a low-level, procedural API, requiring the programmer to dictate the exact steps required to render a scene. This contrasts with descriptive (aka scene graph or retained mode) APIs, where a programmer only needs to describe a scene and can let the library manage the details of rendering it. OpenGL's low-level design requires programmers to have a good knowledge of the graphics pipeline, but also gives a certain amount of freedom to implement novel rendering algorithms.

OpenGL has historically been influential on the development of 3D accelerators, promoting a base level of functionality that is now common in consumer-level hardware:

Simplified version of the Graphics Pipeline Process; excludes a number of features like blending, VBOs and logic ops

A brief description of the process in the graphics pipeline could be:[5]

  1. Evaluation, if necessary, of the polynomial functions which define certain inputs, like NURBS surfaces, approximating curves and the surface geometry.
  2. Vertex operations, transforming and lighting them depending on their material. Also clipping non-visible parts of the scene in order to produce the viewing volume.
  3. Rasterisation or conversion of the previous information into pixels. The polygons are represented by the appropriate colour by means of interpolation algorithms.
  4. Per-fragment operations, like updating values depending on incoming and previously stored depth values, or colour combinations, among others.
  5. Lastly, fragments are inserted into the frame buffer.

Many modern 3D accelerators provide functionality far above this baseline, but these new features are generally enhancements of this basic pipeline rather than radical revisions of it.

Example

This example will draw a green square on the screen. OpenGL has several ways to accomplish this task, but this is the easiest to understand. However, the reader should be aware that most of the APIs used in the code below have been deprecated in and after the OpenGL 3.0 specification.

glClear( GL_COLOR_BUFFER_BIT );
This statement clears the color buffer, so that the screen will start blank. It takes an argument that defines which buffer to clear, in this case it is the color buffer.
glMatrixMode( GL_PROJECTION );      /* Subsequent matrix commands will affect the projection matrix */
glLoadIdentity();                   /* Initialise the projection matrix to identity */
glFrustum( -1, 1, -1, 1, 1, 1000 ); /* Apply a perspective-projection matrix */
These statements initialize the projection matrix, setting a 3d frustum matrix that represents the viewable area (viewing frustum). This matrix transforms objects from camera-relative space to OpenGL's projection space.
glMatrixMode( GL_MODELVIEW );       /* Subsequent matrix commands will affect the modelview matrix */
glLoadIdentity();                   /* Initialise the modelview to identity */
glTranslatef( 0, 0, -3 );           /* Translate the modelview 3 units along the Z axis */
These statements initialize the modelview matrix. This matrix defines a transform from model-relative coordinates to camera space. The combination of the modelview matrix and the projection matrix transforms objects from model-relative space to projection screen space.
glBegin( GL_POLYGON );              /* Begin issuing a polygon */
glColor3f( 0, 1, 0 );               /* Set the current color to green */
glVertex3f( -1, -1, 0 );            /* Issue a vertex */
glVertex3f( -1, 1, 0 );             /* Issue a vertex */
glVertex3f( 1, 1, 0 );              /* Issue a vertex */
glVertex3f( 1, -1, 0 );             /* Issue a vertex */
glEnd();                            /* Finish issuing the polygon */
These commands draw a green square in the XY plane. This is using immediate mode. The square could also be rendered using arrays and calling glDrawArrays( ).

Documentation

OpenGL's popularity is partially due to the quality of its official documentation. The OpenGL ARB 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, 7th edition. ISBN 0-321-55262-8
A readable tutorial and reference book – this is a 'must have' book for OpenGL programmers.
The Green Book
OpenGL Programming for the X Window System. ISBN 0-201-48359-9
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.

Then, for OpenGL 2.0 and beyond:

The Orange Book
OpenGL Shading Language, 3rd edition. ISBN 0-321-63763-1
A readable tutorial and reference book for GLSL.

Extensions

The OpenGL standard allows individual vendors to provide additional functionality through extensions as new technology is created. Extensions may introduce new functions and new constants, and may relax or remove restrictions on existing OpenGL functions. Each vendor has an alphabetic abbreviation that is used in naming their new functions and constants. For example, Nvidia's abbreviation (NV) is used in defining their proprietary function glCombinerParameterfvNV() and their constant GL_NORMAL_MAP_NV.

It may happen that more than one vendor agrees to implement the same extended functionality. In that case, the abbreviation EXT is used. It may further happen that the Architecture Review Board "blesses" the extension. It then becomes known as a standard extension, and the abbreviation ARB is used. The first ARB extension was GL_ARB_multitexture, introduced in version 1.2.1. Following the official extension promotion path, multitexturing is no longer an optionally implemented ARB extension, but has been a part of the OpenGL core API since version 1.3.

Before using an extension a program must first determine its availability, and then obtain pointers to any new functions the extension defines. The mechanism for doing this is platform-specific and libraries such as GLEW and GLEE exist to simplify the process.

Specifications for nearly all extensions can be found at the official extension registry.[6]

Associated utility libraries

Several libraries are built on top of or beside OpenGL to provide features not available in OpenGL itself. Libraries such as GLU can be found with most OpenGL implementations, and others such as GLUT, SDL and Allegro have grown over time and provide rudimentary cross-platform windowing and mouse functionality, and if unavailable can easily be downloaded and added to a development environment. Simple graphical user interface functionality can be found in libraries like GLUI or FLTK. Still other libraries like GLAux (OpenGL Auxiliary Library) are deprecated and have been superseded by functionality commonly available in more popular libraries, but code using them still exists, particularly in simple tutorials. Other libraries have been created to provide OpenGL application developers a simple means of managing OpenGL extensions and versioning. Examples of these libraries include GLEW (the OpenGL Extension Wrangler Library) and GLEE (the OpenGL Easy Extension Library).

In addition to the aforementioned simple libraries, other higher-level object-oriented scene graph retained mode libraries exist such as PLIB, OpenSG, OpenSceneGraph, and OpenGL Performer. These are available as cross-platform free/open source or proprietary programming interfaces written on top of OpenGL and systems libraries to enable the creation of real-time visual simulation applications. Other solutions support parallel OpenGL programs for Virtual Reality, scalability or graphics clusters usage, either transparently like Chromium or through a programming interface like Equalizer.

Mesa 3D is a free/open source implementation of OpenGL. It supports pure software rendering as well as providing hardware acceleration for several 3D graphics cards under Linux. As of version 8.0, released on the 9th of February 2012, it implements the 3.0 standard, and provides some of its own extensions for some platforms.

Bindings

In order to emphasize its multi-language and multi-platform characteristics, various bindings and ports have been developed for OpenGL in many languages. Some languages and their bindings are:

Higher level functionality

OpenGL was designed to be graphic output-only: it provides only rendering functions. The core API has no concept of windowing systems, audio, printing to the screen, keyboard/mouse or other input devices. While this seems restrictive at first, it allows the code that does the rendering to be completely independent of the operating system it is running on, allowing cross-platform development. However, some integration with the native windowing system is required to allow clean interaction with the host system. This is performed through the following add-on APIs:

Additionally, the GLUT, SDL, SFML, and GLFW libraries provide functionality for basic windowing using OpenGL, in a portable manner.

Some open source cross-platform toolkits, such as GTK+, Qt and WxWidgets, include widgets to embed OpenGL contents.

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 much duplication of effort.

By the early 1990s, Silicon Graphics (SGI) was a leader in 3D graphics for workstations. Their IRIS GL API[9] 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.

SGI considered that the IrisGL API itself was not suitable for opening due to licensing and patent issues. Also, the 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.

In addition, SGI had a large number of software customers; by changing to the OpenGL API they planned to keep their customers locked onto SGI (and IBM) hardware for a few years while market support for OpenGL matured. Meanwhile, SGI would continue to try to maintain their customers tied to SGI hardware by developing the advanced and proprietary Iris Inventor and Iris Performer programming APIs.

As a result, SGI released the OpenGL standard.

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,[10] SGI led the creation of the OpenGL architectural review board (OpenGL ARB), the group of companies that would maintain and expand the OpenGL specification for years to come. OpenGL evolved from (and is very similar in style to) SGI's earlier 3D interface, IrisGL. 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.

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.[11]

Microsoft released Direct3D in 1995, which eventually became the main competitor of OpenGL. On December 17, 1997,[12] 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.[13] 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.[14]

On the 31st July, 2006 it was announced at SIGGRAPH that control of the OpenGL specification would be passed to the Khronos group.[15][16]

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: January, 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 logic operations.
EXT_texture Various texturing improvements, including color combiners 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 Allows specification of pixel data in BGRA order, to match the Windows platform.
EXT_packed_pixels Allows the use of a single larger datatype (such as a 32-bit integer) to specify multiple color values.
EXT_rescale_normal Allows normals to be rescaled by the GL, which in some cases removes the need for an expensive normalization.
EXT_separate_specular_color Improves the GL's lighting capabilities, with the addition of texture-independent specular highlighting.
SGIS_texture_edge_clamp Provides a texture-coordinate clamping mode which prevents sampling from border texels.
SGIS_texture_lod Allows greater control over the level-of-detail calculation used to select a texture's mipmap.
EXT_draw_range_elements Provides the DrawRangeElements API, as 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 Provides a standard framework upon which compressed texture formats may be supported, without requiring any actual compression support.
ARB_texture_cube_map Adds support for cube-mapped textures.
ARB_multisample Provides a standard framework upon which multisample anti-aliasing may be supported, without requiring any actual MSAA support.
ARB_multitexture Allows color values from several textures at once to be blended onto a single fragment.
ARB_texture_env_add
ARB_texture_env_combine
ARB_texture_env_dot3
Provides several new mechanisms by which texture colors and fragment colors may be combined.
ARB_texture_border_clamp Provides a clamping mode which forces out-of-bound texture coordinates to sample from the texture's border.
ARB_transpose_matrix Allows transformation matrices to be specified in either row-major order or column-major order.

OpenGL 1.4

Release date: July 24, 2002

Extension Details
SGIS_generate_mipmap Allows texture mipmaps to be automatically generated from the base image of a texture.
NV_blend_square Allows RGB and Alpha values to be squared during alpha-blending.
EXT_blend_color
EXT_blend_minmax
EXT_blend_subtract
Various additional ways to customize the blend equation, promoted from the imaging subset to the core specification.
ARB_depth_texture
ARB_shadow
Allows depth values to be stored in a texture. Applications include shadow-casting and displacement maps.
EXT_fog_coord Provides a way to customize the fog intensity on a per-vertex basis.
EXT_multi_draw_arrays Provides APIs which emulate multiple calls to DrawArrays aor DrawElements, in a single function call.
ARB_point_parameters Permits greater control over the rasterization of point primitives.
EXT_secondary_color Allows use of the "secondary color" mechanism defined by EXT_separate_specular_color, even when lighting is disabled.
EXT_blend_func_separate Allows separate blend functions to be specified for the RGB and Alpha components of the blended pixels.
EXT_stencil_wrap Defines a stencil mode which causes stencil values to increment with wrapping.
ARB_texture_env_crossbar Allows the texture values specified by various texture stages to freely interact with one another.
ARB_texture_mirrored_repeat Provides a new texture-wrapping mode which causes the texture image to be horizontally or vertically mirrored.
ARB_window_pos Provides the WindowPos API, 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 Allows various types of data (especially vertex data) to be cached in high-performance graphics memory.
ARB_occlusion_query Allows an application to query whether or not a primitive was occluded during rendering.
EXT_shadow_funcs Slightly extends the capabilities of the ARB_shadow extension.

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.[17] 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[18] includes support for GLSL.

Extension Details
ARB_shading_language_100
ARB_shader_objects
ARB_vertex_shader
ARB_fragment_shader
Provides access to programmable vertex and fragment processors, via the high-level OpenGL Shading Language.
ARB_draw_buffers Allows shaders to output different colors to multiple render-targets in a single pass. Actual support for multiple render-targets is not guaranteed.
ARB_texture_non_power_of_two Guarantees support for textures with non-power-of-two dimensions.
ARB_point_sprite Allows points to be effectively rendered as screen-oriented textured quads. This is useful for particle systems.
EXT_blend_equation_separate As for EXT_blend_func_separate - allows one blending equation to be specified for RGB colors, and another for the Alpha component.
EXT_stencil_two_side Allows separate stencil algorithms to be specified for 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 Allows pixel data to be stored in high-performance graphics memory, accelerating many image transfers within the GPU.
EXT_texture_sRGB Allows texture pixel values to 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.[19] 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,[20] 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,[21] with many vendors showing support for the update.[22][23]

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.

OpenGL 3.0 also incorporated many extensions, which together require the same level of hardware as Direct3D 10. Since these extensions are very numerous, only the most influential are listed.

Extension Details
EXT_gpu_shader4 API support for the OpenGL Shading Language version 1.30.
EXT_framebuffer_object
EXT_framebuffer_blit
Offscreen rendering, including rendering to any texture, and fast blitting between rendering targets.
ARB_texture_float
EXT_texture_integer
Support for floating-point texture storage, and accessing the actual stored integer values of integer textures.
EXT_texture_compression_rgtc Guarantees support for RGTC, a texture-compression format which operates only on textures with one or two color channels.

OpenGL 3.1

Release Date: March 24, 2009

OpenGL 3.1 fully removed all of the features which were deprecated in version 3.0. It was no longer possible to access features defined in OpenGL 3.1 or above using a full context, nor to access the 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 Provides support for instanced rendering, by which a single set of primitives can be rendered multiple times simultaneously.
EXT_copy_buffer Provides a mechanism to copy data directly from one buffer object to another.
ARB_texture_buffer_object Defines a new type of texture, the buffer texture, which takes its one-dimensional image data from the contents of a buffer object.
ARB_texture_rectangle Guarantees support for rectangular textures.
ARB_uniform_buffer_object Allows uniform shader parameters to be stored in server-side memory.
NV_primitive_restart Allows multiple large primitives (such as triangle strips) to be rendered using a single (very efficient) function call.

OpenGL 3.2

Released on August 3, 2009 and updated on December 7, 2009.
Supported Cards: GeForce 8, GeForce 9, GeForce 100, GeForce 200 and GeForce 300 series, Radeon HD series

Features:

  • OpenGL Shading Language revision 1.50 (GLSL)
  • Geometry Shader support
  • BGRA vertex component ordering
  • Shader Fragment coordinate convention control
  • Seamless cube map filtering
  • Fragment depth clamping
  • Multisampled textures and texture samples for specific sample locations
  • Sync and Fence objects

OpenGL 3.3

Released on March 11, 2010
Supported Cards: GeForce 8, GeForce 9, GeForce 100, GeForce 200 and GeForce 300 series, Radeon HD series

OpenGL 3.3, simultaneously released with OpenGL 4.0 and supplemented by a set of new ARB extensions, backports as much functionality as possible from the OpenGL 4.0 specification for use on previous generation GPU hardware. Includes GLSL 3.30.

OpenGL 4.0

Released on March 11, 2010
Supported Cards: Nvidia GeForce 400 series, Nvidia GeForce 500 series, ATI Radeon HD 5000 series, AMD Radeon HD 6000 Series, AMD Radeon HD 7000 Series, Intel HD Graphics 2500/4000[24]

Features:[25]

  • OpenGL Shading Language revision 4.00 (GLSL)
  • Two new shader stages that enable the GPU to offload geometry tessellation from the CPU.
  • Per-sample fragment shaders and programmable fragment shader input positions for increased rendering quality and anti-aliasing flexibility.
  • Shader subroutines for significantly increased programming flexibility.
  • Separation of texture state and texture data through the addition of a new object type called sampler objects.
  • Drawing of data generated by OpenGL or external APIs such as OpenCL, without CPU intervention.
  • 64-bit double precision floating point shader operations and inputs/outputs for increased rendering accuracy and quality.
  • Performance improvements; such as instanced geometry shaders, instanced arrays and a new timer query.

OpenGL 4.1

Released on 26 July 2010[26]
Supported Cards: Nvidia GeForce 400 series, Nvidia GeForce 500 series, ATI Radeon HD 5000 series, AMD Radeon HD 6000 Series, AMD Radeon HD 7000 Series

This new version adds these additional features to the specification, many of which help bring it in line with those in Direct3D 11:

  • OpenGL Shading language (GLSL) 4.1
  • Full compatibility with OpenGL for Embedded Systems (OpenGL ES) 2.0 APIs
  • Reduced shaders compilation times with the ability to query and load a binary for shader program objects
  • The ability to bind programs individually to the five programmable stages (Vertex, Tessellation Control, Tessellation Evaluation, Geometry, and Fragment)
  • Improvements to the general 64-bit floating point supported added in OpenGL 4.0 (64-bit floating-point component input for vertex shader)

OpenGL 4.2

Released on 8 August 2011[27]
Supported Cards: Nvidia GeForce 400 series, Nvidia GeForce 500 series, Nvidia GeForce 600 series, ATI Radeon HD 5000 series, AMD Radeon HD 6000 Series, AMD Radeon HD 7000 Series

  • Support for shaders with atomic counters and load/store/atomic read-modify-write operations to a single level of a texture.
  • Capturing GPU-tessellated geometry and drawing multiple instances of the result of a transform feedback 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.
  • Support for packing multiple 8 and 16 bit values into a single 32-bit value for efficient shader processing with significantly reduced memory storage and bandwidth.

OpenGL 4.3

Released on 6 August 2012
Supported Cards: Nvidia GeForce 400 series, Nvidia GeForce 500 series, Nvidia GeForce 600 series

  • Compute shaders leveraging GPU parallelism within the context of the graphics pipeline
  • Shader storage buffer objects
  • Texture parameter queries
  • High-quality 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
  • A multi-application robustness extension

Sample renderings

See also

OpenGL support libraries

  • GLU – OpenGL's legacy utility library.
  • GLUT – OpenGL's legacy windowing toolkit.
  • GLee – The OpenGL Easy Extension library.
  • GLEW – The OpenGL Extension Wrangler library.
  • GLM – C++ mathematics toolkit for OpenGL, based on GLSL.

Other 3D graphics APIs

References

  1. ^ Khronos Releases OpenGL 4.3 Specification with Major Enhancements
  2. ^ http://www.sgi.com/products/software/opengl/license.html
  3. ^ http://www.opengl.org/registry/doc/glspec40.core.20100311.pdf OpenGL 4.0 Specification
  4. ^ "SGI - OpenGL Overview".
  5. ^ "The OpenGL Graphics System Specification. Version 2.1" (PDF).
  6. ^ http://www.opengl.org/registry/
  7. ^ http://www.taoframework.com/
  8. ^ http://pike.ida.liu.se/about/pike/modules.xml
  9. ^ "IRIS GL, SGI's property".
  10. ^ "Creation of the OpenGL ARB".
  11. ^ "End of OpenGL++". opengl.org.
  12. ^ "Announcement of Fahrenheit".
  13. ^ "Members of Fahrenheit. 1998". Computergram International. 1998.
  14. ^ "End of Fahrenheit".
  15. ^ OpenGL ARB to pass control of OpenGL specification to Khronos Group, Khronos press release
  16. ^ OpenGL ARB to Pass Control of OpenGL Specification to Khronos Group, AccessMyLibrary Archive
  17. ^ Fedy Abi-Chahla (2008-09-16). "OpenGL 3 (3DLabs And The Evolution Of OpenGL)". Tom's Hardware. Retrieved 2010-10-24.
  18. ^ http://www.opengl.org/documentation/specs/version2.0/glspec20.pdf
  19. ^ "OpenGL ARB announces an update on OpenGL 3.0". October 30, 2007. Retrieved 2007-10-31.
  20. ^ http://tech.slashdot.org/article.pl?sid=08/08/11/2135259
  21. ^ "OpenGL BOF went over well, no pitch forks seen".
  22. ^ http://www.opengl.org/news/nick_haemel_amd_blog_post_opengl_30_a_big_step_in_the_right_direction/
  23. ^ "NVIDIA provides early OpenGL 3.0 driver now".
  24. ^ "Intel HD Graphics Driver v2729 with OpenGL 4 Support and New OpenGL Extensions! - 3D Tech News and Pixel Hacking". Geeks3D.com. Retrieved 2012-05-25.
  25. ^ Khronos webmaster (March 11, 2010). "Khronos Unleashes Cutting-Edge, Cross-Platform Graphics Acceleration with OpenGL 4.0". Khronos Press Releases. Retrieved 2010-03-11.
  26. ^ "OpenGL 4.1 Specification Released".
  27. ^ "Khronos Enriches Cross-Platform 3D Graphics with Release of OpenGL 4.2 Specification".

Books

  • Richard S. Wright, Benjamin Lipchak, Nicholas Haemel, Graham Sellers: OpenGL SuperBible: Comprehensive Tutorial and Reference, 5th Edition, Addison-Wesley, July 23, 2010, ISBN 978-0-321-71261-5
  • Dave Shreiner, The Khronos OpenGL ARB Working Group: OpenGL Programming Guide: The Official Guide to Learning OpenGL, Version 3.0 and 3.1, 7th Edition, Addison-Wesley, July 21, 2009, ISBN 978-0-321-55262-4
  • Fosner, Ron: OpenGL Programming for Windows 95 and Windows NT, Addison Wesley, ISBN 0-201-40709-4
  • Kilgard, Mark: OpenGL for the X Window System, Addison-Wesley, ISBN 0-201-48359-9
  • 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
  • Rost, Randi J.: OpenGL Shading Language, Addison-Wesley, ISBN 0-321-19789-5

Template:Link GA