Platforms

:)

The OpenGl code is the same on each platform but the setup and handling of the windows depends on the platform. Below is a overview on how it is done on each platform but first some multi-platform library's to make it possible to avoid writing any such code at all.

Multi-platform

GLFW - http://www.glfw.org

SDL - https://www.libsdl.org

SFML - http://www.sfml-dev.org

OpenGL Utility Toolkit (GLUT) - https://www.opengl.org/resources/libraries/glut

Common toolkit used in older samples and not active any more. No reason to use it in anything new. Look at GLFW instead.

Platform Details

Windows

To create the OpenGl context in a window one use the WGL API.

OSX

CGL and NSOpenGL.

Linux

On linux the interface to setup OpenGL is called GLX.

Reference

OpenGL Multi-Context ‘Fact’ Sheet