OpenGL AUDIO – How to Add Sound (GAMES & GRAPHICS)

OpenGL is used to render 2D and 3D vector graphics. Many people will be interested in games programming, but the OpenGL API is purely graphics based, i.e. it's purpose has absolutely nothing to do with producing audio.

This leaves many of us with a serious dilemma – how can we make games with OpenGL if it doesn't support sound? OpenGL runs as part of a C++ application (i.e. the game that you are programming). So, you have C++ controlling all the usual stuff, such as updating the scoreboard and lives, loading new levels, collision detection, etc, with OpenGL kind of running along side you C++ code.

Therefore, this means that we're free to choose any sound library that works with C++... how awesome is that? But, what about commercial use? Well, you'll have to pay a license fee to use some libraries, and even some of the free libraries have restrictions. This is where OpenAL comes to the rescue – OpenAL Soft is completely free to use... so after watching this video, to the end 🙂 you'll then have your own seriously cool audio setup.