Since you came here you probably want to learn the inner workings of computer graphics and do all the stuff the cool kids do by yourself. Doing things by yourself is extremely fun and resourceful and gives you a great understanding of graphics programming. However, there are a few items that need to be taken into consideration before starting your journey.


Since OpenGL is a graphics API and not a platform of its own, it requires a language to operate in and the language of choice is Swift, therefore some knowledge of the Swift programming language is required for these tutorials. However, I will try to explain most of the concepts used, including advanced Swift topics where required so it is not required to be an expert in Swift, but you should be able to write more than just a ‘Hello World’ program.

Also, we will be using some math (linear algebra, geometry and trigonometry) along the way and I will try to explain all the required concepts of the math required. However, I’m not a mathematician by heart so even though my explanations might be easy to understand, they will most likely be incomplete. So where necessary I will provide pointers to good resources that explain the material in a more complete fashion. Do not be scared about the mathematical knowledge required before starting your journey into OpenGL; almost all the concepts can be understood with a basic mathematical background and I will try to keep the mathematics to a minimum where possible. Most of the functionality does not even require you to understand all the math as long as you know how to use it.


Learn SwiftGL is broken down into a number of general subjects. Each subject contains several sections that each explain different concepts in large detail. Each of the subjects can be found at the menu to your left. The subjects are taught in a linear fashion (so it is advised to start from the top to the bottom, unless otherwise instructed) where each page explains the background theory and the practical aspects.

To make the tutorials easier to follow and give them some added structure the site contains boxes, code blocks, and color hints.


Blue boxes encompasses some notes or useful tips about the subject at hand.

Yellow boxes describe something important that you shouldn’t forget even after the tutorial.

Red boxes will contain warnings about something that may derail you from the tutorial.


You will find plenty of small pieces of code in the website that are located in boxes with syntax-highlighted code as you can see below:

// This box contains code
print("Hello World")

Since these provide only snippets of code, wherever necessary I will provide a link to the entire source code required for a given subject.

Color hints

Some words are displayed with a different color to make it extra clear these words portray a special meaning:

  • Definition: highlighted words specify a definition i.e. an important aspect/name of something you’re likely to hear more often.
  • Function names, Constants, and Variables: Code words are syntax-highlighted.

Now that you got a bit of a feel of the structure of the site, hop over to the Getting Started section to start your journey in SwiftGL.