Create your own game
eng   рус


In this section we'll learn one of two main 3d libraries (we'll not count Metal from Apple) for rendering of 3d graphics - OpenGL (Open Graphics Library). It's the oldest one (1992).

Tutorials will be for the latest OpenGL version - 4.6. I'll write tutorials relying on two specifications: OpenGL and OpenGL Shading Language (GLSL). I recommend you to download specification of OpenGL (GLSLangSpec.4.60.pdf and glspec46.core.pdf). You can find full description of OpenGL in those documents and these tutorials will just help you to start programming with OpenGL. By the way, documentation for OpenGL is far superior to DirectX.

OpenGL is developing by the Khronos Group. Khronos Group defines the standard. Unlike Directx, OpenGL has many implementations. There are several libraries made for work with OpenGL. We'll learn about them in the first tutorial.

OpenGL is a cross-platform library and it's the main advantage of OpenGL compared to DirectX. OpenGL can be used in different operating systems (Windows, Linux, Android) except OS X and iOS. Apple canceled support of OpenGL in 2018 and the latest version of OpenGL it supported was 4.1. But who in clear conscience would voluntarily program for OS X and iOS? Who are these fools? Don't make my mistakes, stay away from Apple, only bitterness of disappointment awaits you there (unless someone offers you good money).

OpenGL is an API (Application Programming Interface) that allows the interaction with the video card. Using OpenGL functions we tell the video card processor to do something. What exactly we'll know in these tutorials.

GLSL (OpenGL Shader Language)

Learning modern 3d graphics is not possible to avoid shaders. The shader is a small program that is executed by the processor of the video card. So we'll write programs in C/C++ and additionally to them we'll write shaders. OpenGL has it's own language for shaders OpenGL Shader Language (GLSL). OpenGL 4.6 matches to GLSL 4.60. GLSL is similar to C so it will not be difficult for us.

OpenGL ES and WebGL

We'll not learn OpenGL ES and WebGL in these tutorials. OpenGL ES (Embedded Systems) is used on smartphones and WebGL on web pages. But many things from these tutorials can be applied to OpenGL ES and WebGL. OpenGL ES I think is the most used graphics library. Though it's just the subset of OpenGL, so we'll learn "full" version.


OpenGL First Program in Windows
Rendering pipeline in OpenGL