Skip to content

Instantly share code, notes, and snippets.

@loicmolinari
Created September 22, 2018 13:13
Show Gist options
  • Select an option

  • Save loicmolinari/def8d6a880c5d4cb1179cdfd25e48ce9 to your computer and use it in GitHub Desktop.

Select an option

Save loicmolinari/def8d6a880c5d4cb1179cdfd25e48ce9 to your computer and use it in GitHub Desktop.
OpenGL reminder

OpenGL

Here is a list of the biggest features and changes in OpenGL throughout the years.

OpenGL 1.1 (March 4, 1997)

  • 2D textures

OpenGL 1.2 (March 16, 1998)

  • 3D textures
  • BGRA texture format
  • packed formats

OpenGL 1.3 (August 14, 2001)

  • cubemap textures
  • multi textures
  • texture combiners
  • texture compression
  • MSAA

OpenGL 1.4 (July 24, 2002)

  • depth textures and texture compare utilities (shadow rendering)
  • separate color/alpha blending funcs
  • vertex and fragment ASM programs (extension)

OpenGL 1.5 (July 29, 2003)

  • Vertex Buffer Objects
  • occlusion queries
  • GLSL 1.0 with vertex and pixel shaders (extension)

OpenGL 2.0 (September 7, 2004)

  • GLSL 1.1 with vertex and pixel shader
  • Multiple Render Targets
  • NPOT textures

OpenGL 2.1 (July 2, 2006)

  • GLSL 1.2
  • Pixel Buffer Objects
  • sRGB textures

OpenGL 3.0 (August 11, 2008)

  • old features deprecation (forward-compatible context creation)
    • fixed function vertex and fragment processing
    • direct mode (glBegin/glEnd)
    • display lists
    • indexed color render targets
  • GLSL 1.3
  • FrameBuffer Objects
  • floating-point textures and depth buffer
  • sRGB framebuffers
  • conditional rendering for occlusion queries
  • transform feedback
  • 2D and 3D texture arrays (could be used instead of texture atlases)

OpenGL 3.1 (March 24, 2009)

  • removed features deprecated in 3.0
  • GLSL 1.4
  • rectangle textures
  • buffer textures
  • geometry instancing
  • Uniform Buffer Objects (useful for geometry instancing by storing the model-view matrices for instance)
  • primitive restart
  • signed normalized internal texture formats

OpenGL 3.2 (August 3, 2009)

  • core and compatibility context profiles
  • GLSL 1.5
  • geometry shaders
  • Direct3D frag coord conventions (using origin_upper_left and pixel_center_integer layouts)
  • synchronization primitives
  • multisample textures

OpenGL 3.3 (March 11, 2010)

  • Direct3D 10 compatibility (backport as much features as possible, other features go in OpenGL 4.0 released at the same time)
  • GLSL 3.30
  • geometry instancing arrays (use added attribs to control instancing instead of a RO vertex shader counter variable)
  • sampler objects (bind sampling states to texture units, allows state sharing, allows a single texture to be sampled with different parameters in a single pass without duplicating the texture data)
  • timer queries
  • occlusion queries efficiency improvements
  • explicit attribute location
  • texture swizzle

OpenGL 4.0 (March 11, 2010)

  • Direct3D 11 compatibility
  • GLSL 4.00
  • tessellation shaders
  • blend functions for each color output
  • request a minimum number of MSAA samples to be shaded
  • cubemap texture arrays
  • texture gather (allows getting components of the 2x2 footprint and implement custom filtering)
  • texture LOD query from fragment shader
  • extended transform feedback
  • indirect draws (draw from buffer object memory)
  • indirect shader subroutine calls
  • 64-bit floating-point shader types

OpenGL 4.1 (July 26, 2010)

  • GLSL 4.10
  • OpenGL ES 2 compat
  • get/set binary shader programs
  • separate shader objects (independently set shaders to stages)
  • 64-bit floating-point vertex attribs

OpenGL 4.2 (August 8, 2011)

  • GLSL 4.20
  • atomic counters
  • texture storage (speed up mipmap level validation by specifying all parameters once and allow implementation to optimize by knowing the texture won't be changed)
  • fast transform feedback instanced draws
  • shader image load/store and memory barriers
  • conservative depth (allows early depth test even if writing depth from fragment shader)
  • 64 bytes aligned buffer maps

OpenGL 4.3 (August 6, 2012)

  • GLSL 4.30
  • OpenGL ES 3 compat
  • compute shaders
  • debug mode
  • arrays of arrays in shaders
  • clear buffer objects (basically a memset)
  • GPU side image memcpy
  • texture views
  • allows framebuffer objects with no attachments (image load/store only may be used without writing to the framebuffer)
  • multi indirect draws (allows large batches of drawing commands to be assembled in server memory) AZDO
  • robust memory access
  • query image size from shader
  • shader storage buffer objects (to investigate)
  • extended texture storage from 4.2 to multisample textures

OpenGL 4.4 (July 22, 2013)

  • GLSL 4.40
  • applied texture storage semantic to buffer objects (immutability allows driver optimization, a persistent flag has been added to allow draw commands while mapped)
  • texture clears
  • layout keyword extensions
  • issue multiple binds in one call
  • query to buffer objects (minimizes sync points)

OpenGL 4.5 (August 11, 2014)

  • GLSL 4.50
  • OpenGL ES 3.1 compat
  • cull whole primitives in fragment shader
  • coarse and fine derivatives
  • Direct State Access (create, query and change states without binding)
  • get texture sub image (useful to get just one slice of texture array)
  • get number of texture samples from shader
  • flush control over outgoing contexts
  • robustness over errors (out of bounds, resets, etc)

OpenGL 4.6 (July 31, 2017)

  • TODO

What is modern OpenGL?

came to realise bottleneck is often the driver: sync and alloc (buffer updates), validation and compilation (binding objects), etc, so the KRH OpenGL working group worked on Approaching Zero Driver Overhead (AZDO).

  • persistent mapped buffer (4.4) -> faster streaming of dyn geometry
    • map once at creation (glMapBufferRange) with persistent flags
    • no more map/unmap but manual fence syncs
  • multi indirect draws (4.3) -> faster submission of many draw calls
  • texture arrays (3.0) -> texture changes no longer break batches
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment