Graphics‎ > ‎Graphic API‎ > ‎

OpenGl

glEnable(GL_EPIC);

OpenGL (Open Graphics Library) is a API for rendering 2D and 3D graphics. It's is available in a number of versions and on many platforms. These pages aim for version 4.3.

The Basic Stuff
The statemachine
OpenGl is a state machine and the state is stored in the context of OpenGL and the objects created in the context. By using functions you can modify the state in the context or the objects and by setting objects as active you can change many states at the same time. When drawing something it is using the current state to decide what shows up on the screen.  Opengl objects are namned using GLuint values. Values are reserved using the glGen* and deleted with dlDelete*. The resulting name can be any value besides 0 and they are used with glBind*. There is also a function glIs* that can be used to check if a opengl object is of a specific type.

void glGen*(GLsizei n​, GLuint *arrays​);
GLboolean glIs*(GLuint array​);
void glBind*(GLuint array​);
void glDelete*(GLsizei n​, const GLuint *arrays​);

The Interface

OpenGL use the prefix gl for OpenGL commands. Constants begin with GL_ and use all capital letters. Some functions comes in many versions and they then use suffix to specify the number of arguments and the return type. Ex glColor3f takes 3 floats and glColor4d takes four double.

The Extensions

OpenGL Extensions - 2012
Guide
  • Buffers: Buffer objects are used to store data that one use in or get from opengl.
  • Textures: Contains one or more images and are used from shaders or used as a render target.
  • Shaders:
  • GLSL: The shading language used in OpenGL.
  • Drawing: Rendering can be indexed (*elements) or non-indexed (*arrays).
  • Framebuffer: Select what to draw to.
  • Optimization
Reference

OpenGL like Vulkan - 2016
GPU-Driven Large Scene Rendering in OpenGL - 2015
Bringing Unreal Engine 4 To Opengl (video) (slides) - 2014
Moving Your Games to OpenGL - 2014
OpenGL Scene Rendering Techniques - 2014
Quad Meshes - 2013
Clip Planes - 2012
Modern OpenGL - 2012
OpenGL vs DirectX: The War Is Far From Over - 2011
Unit testing OpenGL applications - 2010
Going mobile with OpenGL ES - 2010
An introduction to OpenGL 4.1 - 2010
A brief preview of the new features introduced by OpenGL 3.3 and 4.0 - 2010

Software