Questions tagged [opengl]

OpenGL (Open Graphics Library) is a graphics standard and API which is platform independent and available for desktop, workstation and mobile devices. It is designed to provide hardware-accelerated rendering, and hence gives greatly improved performance over traditional software rendering. OpenGL is used for applications like CAD software and computer games. The OpenGL standard, as well as OpenGL ES, is controlled by the Khronos group.

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.

The tag should only be used for questions about desktop OpenGL. OpenGL ES (OpenGL for Embedded Systems) and WebGL have their own tags - and . When posting in the tag, remember to always specify your target OpenGL version in order to get more precise answers. The tags , , and exist for this purpose.

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 will not be backwards compatible.

External resources

Unofficial Tutorials

Books

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 31, 2017
36259 questions
283
votes
4 answers

Once upon a time, when > was faster than < ... Wait, what?

I am reading an awesome OpenGL tutorial. It's really great, trust me. The topic I am currently at is Z-buffer. Aside from explaining what's it all about, the author mentions that we can perform custom depth tests, such as GL_LESS, GL_ALWAYS, etc. He…
Armen Tsirunyan
  • 120,726
  • 52
  • 304
  • 418
233
votes
10 answers

How do you render primitives as wireframes in OpenGL?

How do you render primitives as wireframes in OpenGL?
Phineas
209
votes
11 answers

How to debug a GLSL shader?

I need to debug a GLSL program but I don't know how to output intermediate result. Is it possible to make some debug traces (like with printf) with GLSL ?
Franck Freiburger
  • 21,662
  • 20
  • 60
  • 90
203
votes
5 answers

What is state-of-the-art for text rendering in OpenGL as of version 4.1?

There are already a number of questions about text rendering in OpenGL, such as: How to do OpenGL live text-rendering for a GUI? But mostly what is discussed is rendering textured quads using the fixed-function pipeline. Surely shaders must make…
Ben Voigt
  • 260,885
  • 36
  • 380
  • 671
189
votes
17 answers

How are 3D games so efficient?

There is something I have never understood. How can a great big PC game like GTA IV use 50% of my CPU and run at 60fps while a DX demo of a rotating Teapot @ 60fps uses a whopping 30% ?
jmasterx
  • 47,653
  • 87
  • 281
  • 523
142
votes
3 answers

Differences and relationship between glActiveTexture and glBindTexture

From what I gather, glActiveTexture sets the active "texture unit". Each texture unit can have multiple texture targets (usually GL_TEXTURE_1D, 2D, 3D or CUBE_MAP). If I understand correctly, you have to call glActiveTexture to set the texture unit…
mpen
  • 237,624
  • 230
  • 766
  • 1,119
140
votes
2 answers

What's the concept of and differences between Framebuffer and Renderbuffer in OpenGL?

I'm confused about concept of Framebuffer and Renderbuffer. I know that they're required to render, but I want to understand them before use. I know some bitmap buffer is required to store the temporary drawing result. The back buffer. And the other…
eonil
  • 75,400
  • 74
  • 294
  • 482
139
votes
7 answers

How to compile for Windows on Linux with gcc/g++?

I have written some effects in C++ (g++) using freeglut on Linux, and I compile them with g++ -Wall -lglut part8.cpp -o part8 So I was wondering if it is possible to have g++ make static compiled Windows executables that contains everything…
Louise
  • 5,275
  • 12
  • 33
  • 34
138
votes
6 answers

What does glLoadIdentity() do in OpenGL?

I'm new to OpenGL and I'm a little overwhelmed with all of the random functions that I have in my code. They work and I know when to use them, but I don't know why I need them or what they actually do. I know that glLoadIdentity() replaces the…
Alexander
  • 2,947
  • 6
  • 22
  • 17
136
votes
5 answers

What is the correct file extension for GLSL shaders?

I'm learning glsl shading and I've come across different file formats. I've seen people giving their vertex and fragment shaders .vert and .frag extensions. But I've also seen .vsh and .fsh extensions, and even both shaders together in a single…
Samssonart
  • 3,193
  • 3
  • 25
  • 41
136
votes
5 answers

Vertex shader vs Fragment Shader

I've read some tutorials regarding Cg, yet one thing is not quite clear to me. What exactly is the difference between vertex and fragment shaders? And for what situations is one better suited than the other?
adivasile
  • 2,108
  • 3
  • 23
  • 30
125
votes
4 answers

What are Vertex Array Objects?

I am just starting to learn OpenGL today from this tutorial: http://openglbook.com/the-book/ I got to chapter 2, where I draw a triangle, and I understand everything except VAOs (is this acronym OK?). The tutorial has this code:…
Patrick
  • 1,704
  • 3
  • 14
  • 17
120
votes
9 answers

Using OpenGl with C#?

Is there free OpenGL support libraries for C#? If so, which one do I use and where do I find sample projects? Does C# provide classes for OpenGL?
MegaByte
  • 6,445
  • 10
  • 34
  • 33
109
votes
2 answers

The purpose of Model View Projection Matrix

For what purposes are we using Model View Projection Matrix? Why do shaders require Model View Projection Matrix?
Yuriy Vikulov
  • 2,487
  • 5
  • 20
  • 29
105
votes
8 answers

opengl: glFlush() vs. glFinish()

I'm having trouble distinguishing the practical difference between calling glFlush() and glFinish(). The docs say that glFlush() and glFinish() will push all buffered operations to OpenGL so that one can be assured they will all be executed, the…
jay.lee
  • 17,466
  • 7
  • 36
  • 38
1
2 3
99 100