Questions tagged [opengl]

OpenGL is a graphics standard and API which targets the desktop and workstation markets. It is designed to be easy to accelerate with dedicated computer hardware, and hence most implementations give greatly improved performance over traditional software rendering. Currently, OpenGL is used for applications like CAD software and computer games. It is also cross-platform. The OpenGL standard is controlled by the Khronos group, which also controls OpenGL ES.

OpenGL (Open Graphics Library) is an API used to interact with GPUs (Graphics Processing Units). Originally developed by SGI (Silicon Graphics Inc.) in the early 90's, the current API is being developed by the Khronos Group.

OpenGL is platform independent and available for desktop, workstation and mobile devices. It is designed to provide hardware-accelerated rendering and is typically used for applications such as CAD software and computer games.

When posting in the tag, remember to always specify your target OpenGL version in order to get more precise answers. OpenGL ES (OpenGL for Embedded Systems) has its own tag - (with specific version tags for and .

Official Documentation

  • The Red Book - Tutorial GL
  • The Orange Book - Tutorial for GLSL
  • The Green Book - Tutorial for GLX
  • The Blue Book - API references for GL (out of print; replaced by online reference pages)
  • The White Book - Tutorial for WGL

Successor

Khronos Group announced API at GDC (Game Developers Conference) 2015. Vulkan, previously known as glNext or the "Next Generation OpenGL Initiative", is widely thought of as the successor to OpenGL and shares many similarities to the API. It is a complete redesign aimed to unify the OpenGL and OpenGL-ES API's into one common API that is not backwards compatible.

External resources

Release Dates

  • OpenGL 1.0 - January 1992
  • OpenGL 1.1 - January 1997
  • OpenGL 1.2.1 - October 1998
  • OpenGL 1.3 - August 2001
  • OpenGL 1.4 - July 2002
  • OpenGL 1.5 - July 2003
  • OpenGL 2.0 - September 2004
  • OpenGL 2.1 - July 2006
  • OpenGL 3.0 - August 2008
  • OpenGL 3.1 - March 2009
  • OpenGL 3.2 - August 2009
  • OpenGL 3.3 - March 2010
  • OpenGL 4.0 - March 2010
  • OpenGL 4.1 - July 2010
  • OpenGL 4.2 - August 2011
  • OpenGL 4.3 - August 2012
  • OpenGL 4.4 - July 2013
  • OpenGL 4.5 - August 2014
  • OpenGL 4.6 - July 2017
4310 questions
88
votes
15 answers

What are some good learning resources for OpenGL?

I have been using the OpenGL ES on the iPhone for a while now and basically I feel pretty lost outside to the small set of commands I've seen in examples and adopted as my own. I would love to use OpenGL on other platforms and have a good…
DFectuoso
  • 916
  • 4
  • 11
  • 20
44
votes
10 answers

Is learning OpenGL 2.1 useless today?

I'm new to 3D OpenGL/DirectX world and I found out that OpenGL 4.1 and GLSL specifications were just released today. A friend of mine gave me the Red Book for OGL v2.1 but, as far as I've read, 3.x and 4.x differ a lot from 2.x and a lot of things…
jorge_codes
  • 2,308
  • 1
  • 19
  • 24
40
votes
4 answers

What's the purpose of OpenGL's Vertex Array Objects?

I've just started out with OpenGL I still haven't really understood what Vertex Array Objects are and how they can be employed. If Vertex Buffer Object are used to store vertex data (such as their positions and texture coordinates) and the VAOs only…
user5140
36
votes
5 answers

Drawing lots of tiles with OpenGL, the modern way

I'm working on a small tile/sprite-based PC game with a team of people, and we're running into performance issues. The last time I used OpenGL was around 2004, so I've been teaching myself how to use the core profile, and I'm finding myself a little…
Nic
  • 361
  • 1
  • 3
  • 4
22
votes
1 answer

How would you implement chromatic aberration?

How would you implement the effect of chromatic aberration with shaders? Would rendering of the world with different focus distances for each color solve the problem (maybe with the usage of only one depth rendering pass)?
Quonux
  • 1,235
  • 1
  • 12
  • 19
20
votes
6 answers

OpenGL wireframe

No, I'm not looking for glPolygonMode. I'm searching for a method, possibly a GLSL shader that would produce that retro-style wireframe look for objects. Any suggestions? Something like Vector Tanks had. Preferably the solution should work on…
19
votes
3 answers

What is the purpose of indices in 3D rendering?

Suppose you were creating a 3D cube in OpenGL. You implement the necessary vertex data for the object (cube). What would be the point of using indices? void CreateCube() { const Vertex VERTICES[8] = { …
Sad CRUD Developer
  • 737
  • 4
  • 8
  • 14
19
votes
6 answers

What version of OpenGL should I code for, given compatibility and performance considerations?

When the OpenGL spec is updated, they only ever add features. So in theory, the latest and greatest hardware with support for the Core and Compatibility profiles should run super old OpenGL1.1 code just fine. This has turned out to be true. I've…
Suds
  • 827
  • 2
  • 7
  • 13
16
votes
3 answers

When to use a vertex array and when to use a VBO?

I'm trying to learn about vertex arrays and vertex buffer objects, but I don't understand the differences in terms of: case-of-use (static geometry like terrains, geometry that changes every frame like a particle system,…
nkint
  • 961
  • 3
  • 13
  • 28
14
votes
1 answer

Does the order of vertex buffer data when rendering indexed primitives matter?

I'm building a 3d object's triangles. If I can write them to the buffer in the order they are calculated it will simplify the CPU code. The vertices for the triangles will not be contiguous. Is there any performance penalty for writing them out of…
Jay
  • 453
  • 4
  • 17
14
votes
4 answers

Getting a texture from a renderbuffer in OpenGL?

I've got a renderbuffer (DepthStencil) in an FBO and I need to get a texture from it. I can't have both a DepthComponent texture and a DepthStencil renderbuffer in the FBO, it seems, so I need some way to convert the renderbuffer to a DepthComponent…
Rushyo
  • 1,103
  • 9
  • 18
14
votes
1 answer

differences between opengl 3 and opengl 4

I'm just getting started with game programming and I want to start learning opengl. I found a very great tutorial from scratch to get started with opengl 3 and I'm wondering if there is a big difference between openGL 3 and openGl 4. Or I should…
Mansuro
  • 509
  • 2
  • 5
  • 16
14
votes
5 answers

Learning OpenGL: Red and Blue book still relevant?

I've recently purchased the Orange book( GLSL ) and am wondering if it is important at all to read through the red and blue books as well? Any thoughts?
Joey Green
  • 2,509
  • 4
  • 26
  • 46
13
votes
2 answers

What is the advantage of OpenGL's direct state access mechanism?

I've been reading about OpenGL 4.5 Direct State Access (DSA) at opengl.org and not sure if I'm getting it right. It seems to imply, that the old way is less efficient: glBind(something) glSetA(..) glSetB(..) glSetC(..) than the new…
Kromster
  • 10,643
  • 4
  • 53
  • 67
13
votes
2 answers

What is the difference between OpenGL 1.x and 2.x?

Is there a good tutorial that shows the difference between OpenGL 1.* and 2.*? It would be very helpful to know which functions I should not be calling (like glBegin(), I assume).
t123
  • 703
  • 1
  • 7
  • 18
1
2 3
17 18