Welcome to SwiftGL

Welcome to my humble attempt to facilitate a well-developed teaching platform for the graphics API called OpenGL using the Swift programming language. Whether you are trying to learn OpenGL for academic purposes, to pursue a career or simply looking for a hobby, this site will teach you the basics, the intermediate and all the advanced knowledge using modern (core-profile) OpenGL. The aim is to show you all there is to modern OpenGL in an easy-to-understand fashion with clear Swift examples, while also providing a useful reference for later studies.

So why read these tutorials?

Throughout the internet there are thousands of documents and resources on learning OpenGL, however, most of these resources are only focused on OpenGL’s immediate mode (commonly referred to as the old OpenGL) or are incomplete, lack proper documentation or are not suited for your learning preferences. Therefore, my aim is to provide a platform that is both complete and easy to understand.

Image of smiling textured containers in OpenGL

If you enjoy reading tutorials that provide step-by-step instructions, clear examples and that won’t throw you in the deep with millions of details, these tutorials are probably for you. The tutorials aim to be understandable for people without any graphics programming experience, but are still interesting to read for the more experienced users. The tutorials also discusses practical concepts that, with some added creativity, could turn your ideas into real 3D applications. If all of the previous sounds like someone that could be you, then by all means, please continue.

What will you learn?

The focus of the tutorials are on Modern OpenGL. Learning (and using) modern OpenGL requires a strong knowledge of graphics programming and how OpenGL operates under the hood to really get the best of your experience. So we will start by discussing core graphics aspects, how OpenGL actually draws pixels to your screen, and how we can abuse that knowledge to create some funky looking effects.

Aside from the core knowledge we will discuss many useful techniques that you can use for your applications like walking through your scenes, create beautiful lighting, load custom-made objects from a modelling program, do cool post-processing techniques and much more. Over time, we will also feature walkthrough tutorials where we actually create small games based on our obtained OpenGL knowledge, so you will really get a feel of what it’s like to actually do graphics programming.

About

Much of this tutorial was taken from Joey de Vries’s learnopengl.com. There’s also parts from from Alexander Overvoorde’s open.gl. The work to make this a Swift tutorial was done by David Turnbull.

Text, images, and videos are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. To the extent possible under law, source code examples are released of all copyright and related rights as a Creative Commons Public Domain Dedication.

Creative Commons License CC0