Do you want to learn modern OpenGL from the scratch and you have no idea where to start? Then you're in the right place !
This series covers step-by-step learning of OpenGL 4 and later. There is no deprecated OpenGL stuff involved and the minimum OpenGL context used in the tutorials is 4.4.
As a fundamental library to handle basic stuff like windows creation, I decided to stick with GLFW Library, seems to be most widely used and is properly maintained.
All the tutorials in this series are hosted in their own repository on GitHub, so simply clone this repository and open for example Visual Studio Solution packed within and build them right away :
Now here in this tutorial it gets interesting ! We finally make our first 3D scene!
Not only that, we will also learn, how to calculate Frames Per Second (FPS) value and then adjust all the animation values (rotation angle in the case of this tutorial), so that animation is smooth and consistent, no matter how much FPS you have!
This tutorial brings you very nice camera, which is controlled by mouse and WSAD keys, just as in most FPS games . Finally, you can move freely around the scene and you can even fly .
The scene is same as in the previous tutorial, but now you may look on it from above .
This tutorial will teach, how to apply texture to geometry. Texture is an image you can cover object with, however there is more to it than meets they eye .
You will also learn about different ways how to filter textures, that means, what ways to use, when you look at the object from big distance, small distance and so on. The OpenGL object responsible for doing this is called Sampler and we will discuss them in this article as well.
The tutorial itself renders 10 different houses, each of which has different texture filters applied, so that you can immediately see, what difference it makes, if you use different filters.
And there is also a little bonus in this tutorial ! If you pass through any of the houses, you will set the filtering for ground as well! Then you will really see, what difference it makes if you apply different filtering techniques .
It's almost Christmas time and this is my Christmas present for you! In this tutorial, you will learn, what is multitexturing - that is applying multiple textures on the same objects at once.
And because it's the most wonderful time of the year, I have decided to create a nice, Christmas themed scene, where you walk through a village with several houses on a snow-covered pavement .
Have you ever wondered, how to create 2D game panel, containing your current hitpoints, ammo or how much armor you have? Well now you can learn that! But because it's Christmas time, we won't show any ammo, nor armor or hitpoints, but a Christmas tree with snowflake instead .
In this tutorial, we will learn, how to do rendering in 2D over the scene using orthographic projection. This is pretty common in computer games to create menus or HUDs (head-up displays). We will build on foundation of this tutorial to create fonts later .
The same scene? Again? Third time? You should come up with something new!
Maybe that's what you think, when you see the thumbnail, but worry not! There is so much new stuff in this tutorial, although the result is same. But code is much more systematic and cleaner than it was! In this tutorial, we simply look back on what we've done and try to improve our code. You might have seen, that the code has been getting a bit too much copy-pasty lately and the initialization / render functions have gotten way too long.
I have introduced lots of new things in this tutorial and it took definitely longest to program. Basically every object has now its manager, so that you can access it from anywhere. Furthermore, managers clean objects nicely, so we don't forget to remove any shader program! Just read the article and see the changes for yourself .
In this tutorial, we will explore another way of rendering objects - Indexed Rendering. Long story short - you just generate a list of vertices and then tell OpenGL, which vertices form faces and mesh using indices .
To demonstrate it, I have chosen torus as a nice example, where indexed rendering might be used. In the scene, you can see 10 icy pyramids with tori on top .
In this tutorial we will learn, how to output text using OpenGL and FreeType Project - a free library for font rendering. We will learn, how to build and render fonts from TrueType fonts and store the characters in the texture atlas .
Finally we are able to output anything that we want anywhere on the screen, not just set the window title with all information as it was until now !
After two weeks, I came up with another tutorial, although this one is rather short and pretty easy, so I would say it's a chilltorial . It's about blending and how can we use it (wisely) to make objects on our scene transparent .
You will finally understand, what is blending, source buffer, destination buffer, alpha and several blending calculations that exist. This is just a first part however, later on, I want to cover more interesting topics, like Order Independent Transparency .
Finally it's all getting exciting! We will incorporate normals of vectors to calculate more realistic colors of objects! In this tutorial, we will actually learn Phong Shading .
But wait, there's more! This tutorial explains in detail what is ambient light and diffuse light and how to use them. You can play around with variety of keys in this tutorial to observe different behavior when using different settings!
You can create day, dawn or nightly scene effect just by setting the correct parameters .