Learn OpenGL

Recommended

1. Introduction

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.

1.1 Prerequisites

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 C++. Therefore a decent knowledge of the C++ programming language is required for these tutorials. However, I will try to explain most of the concepts used, including advanced C++ topics where required so it is not required to be an expert in C++, but you should be able to write more than just a ’Hello World’ program. If you don’t have much experience with C++ I can recommend the free tutorials at www.learncpp.com.

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 bhttps://en.wikipedia.org/wiki/Geometryy heart so even though my explanations may 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. Don’t 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 doesn’t even require you to understand all the math as long as you know how to use it.

1.2 Structure

LearnOpenGL is broken down into a number of general sections. Each section contains several chapters that each explain different concepts in large detail. The subjects are taught in a linear fashion (so it is advised to start from start to finish, unless otherwise instructed) where each chapter explains the background theory and the practical aspects.

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

1.2.1 Boxes

Green boxes encompasses some notes or useful features/hints about OpenGL or the subject at hand.

Red boxes will contain warnings or other features you have to be extra careful with.

1.2.2 Code

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

// This box contains code

Since these provide only snippets of code, wherever necessary you’ll find a path to the full source code of the chapter demo(s). The source code paths are relative to the root of the LearnOpenGL repository on GitHub which you can find at: github.com/JoeyDeVries/learnopengl. The repository contains full source code samples for every chapter. It’s recommended to download the repository and review the full source code samples at the end of each chapter to see how everything fits together as a whole.

1.2.3 Color hints

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

  • Definition: green words specify a definition i.e. an important aspect/name of something you’re likely to hear more often.
  • Program structure: red words specify function names or class names.
  • Variables: blue words specify variables including all OpenGL constants.

Now that you got a bit of a feel of the structure of the book, hop over to the Getting Started section to start your journey in OpenGL!

Attribution

Joey de Vries (2020), Learn OpenGL, URL: https://learnopengl.com/

The online version of this book is available for free on Learn Open GL. Thank you for providing us with such a great book.

VP Flipbook Maker

Display your work in an interesting way with VP Online Flipbook Maker! It is a professional tool supporting flipbook conversion and creation. Try it now!