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
7
votes
3 answers

A few questions about ray tracing with opengl

I need to do a limited form of ray tracing. I do not need reflections. I only need to change the color of a pixel, depending on how it passes by an object, and refraction. I also only need to test for intersections between the ray and spheres and…
user467526
  • 507
  • 3
  • 19
7
votes
1 answer

SDL / OpenGL: Implementing a "Loading thread"

I currently try to implement a "Loading thread" for a very basic gaming engine, which takes care of loading e.g. textures or audio while the main thread keeps rendering a proper message/screen until the operation is finished or even render regular…
PuerNoctis
  • 1,264
  • 14
  • 31
7
votes
1 answer

Qt & OpenGL - QGLWidget & QPainter: depth buffering

I subclass QGLWidget and have my painting code in paintEvent instead of paintGL as I want to paint a 2D overlay using QPainter over my 3D stuff done with OpenGL. My depth buffering works fine when I don't have an overlay. If the overlay is painted,…
user816098
  • 262
  • 2
  • 14
7
votes
1 answer

per-fragment lighting coordinate system

I'm developing an OpenGL 2.1 application using shaders and I'm having a problem with my per-fragment lighting. The lighting is correct when my scene initial loads, but as I navigate around the scene, the lighting moves around with the "camera",…
Nitrex88
  • 2,132
  • 2
  • 20
  • 23
7
votes
1 answer

C - invalid use of non-lvalue array

I have a matrix struct: typedef struct Matrix { float m[16]; } Matrix; When I try to call this function: memcpy(m->m, MultiplyMatrices(m, &translation).m, sizeof(m->m)); I get an error at compile time saying: error: invalid use of non-lvalue…
miningold
  • 699
  • 2
  • 9
  • 19
7
votes
2 answers

Develop using OpenGL 4.x on OSX Big Sur

According to Apple, OpenGL is no longer supported. However, it appears v4.1 of OpenGL was supported on many devices as of July 28, 2020. I have a 2020 Macbook Pro 16" model, which does not show up on the list provided above. While I am sure some…
primelf
  • 336
  • 4
  • 16
7
votes
3 answers

Using a different array for vertices and normals in glDrawElements (OpenGL/VBOs)

I'm currently programming a .obj loader in OpenGL. I store the vertex data in a VBO, then bind it using Vertex Attribs. Same for normals. Thing is, the normal data and vertex data aren't stored in the same order. The indices I give to glDrawElements…
Tuxer
  • 71
  • 1
  • 2
7
votes
2 answers

Best technique to handle vertices in OpenGL? C++

I am implementing a map renderer for Quake. I am currently running through the arrays of vertices and sending them one at a time. I was told that by using vertex arrays, I can greatly speed up the rendering process by sending vertices in a batch.…
Pladnius Brooks
  • 1,068
  • 2
  • 16
  • 31
7
votes
3 answers

Modern OpenGL Question

In my OpenGL research (the OpenGL Red Book, I think) I came across an example of a model of an articulating robot arm consisting of an "upper arm", a "lower arm", a "hand", and five or more "fingers". Each of the sections should be able to move…
seveland
  • 181
  • 12
7
votes
3 answers

Qt rendering using OpenGL

I'm working on a QML application for an embedded platform which includes a GridView widget containing images. It's important for me that scrolling through the GridView will be smooth and will not put load on the CPU. Can I expect Qt to use OpenGL to…
wanderingbear
  • 982
  • 3
  • 10
  • 18
7
votes
3 answers

Global Rotation

in GLScene we have three parameters (RollAngle, PitchAngle and TurnAngle) for rotation around local orientation. in the image below, how can I rotate cube around global orientation (orange axis)?
Ata
  • 253
  • 1
  • 5
  • 13
7
votes
1 answer

OpenGL Vertex buffer object, can I access the vertex data for other uses such as collision detection?

I'm currently using the GLTools classes that come along with the Superbible 5th edition. I'm looking in the GLTriangleBatch class and it has the following code: // Create the master vertex array object glGenVertexArrays(1,…
kbirk
  • 3,687
  • 5
  • 38
  • 66
7
votes
1 answer

Why does GLSL lighting code shift the light spot with the camera?

I am trying to make a custom light shader and was trying a lot of different things over time. Some of the solutions I found work better, others worse. For this question I'm using the solution which worked best so far. My problem is, that if I move…
Cobra_Fast
  • 14,395
  • 8
  • 51
  • 97
7
votes
3 answers

How to check if an object lies outside the clipping volume in OpenGL?

I'm really confused about OpenGL's modelview transformation. I understand all the transformation processes, but when it comes to projection matrix, I'm lost :( If I have a point P (x, y, z), how can I check to see if this point will be drawn on a…
Chan
  • 12,569
  • 40
  • 99
  • 152
7
votes
3 answers

Good extensible project that will help me learn theoretical computer graphics?

I never got to take a computer graphics course in university, but I want to have a thorough understanding of everything you'd learn in that course. I figure the best way to learn is through practice (programming). If I were to start an OpenGL…
cold
  • 81
  • 3
1 2 3
99
100