C++ 3D Game Tutorial Series: 9 | Transformation Matrix | Early Access | Source Code on GitHub
The ninth tutorial of C++ 3D Game Tutorial Series is finally available in early access on GitHub!
Saturday 14th February 2026

C++ 3D Game Tutorial Series: 9 | Transformation Matrix | Source Code on GitHub


The source code of the 9th tutorial of the C++ 3D Game Tutorial Series is now available in early access on GitHub!

 

 

In this tutorial, we’ll explore how to move, rotate, and scale a quadrilateral using Transformation Matrices.

Specifically, we’ll cover:

  • What is a Transformation Matrix
  • How to create a Matrix class.
  • How to compute the Scale Matrix, the Rotation Matrix (around the Z axis), and the Translation Matrix.
  • How to multiply these matrices together to build the World Matrix.
  • The difference between row-major and column-major matrices and how this affects multiplication order and transformation application.
  • How to pass world matrix data from the CPU to the GPU.
  • How to use the world matrix in the shader to move, rotate, and scale our colored quadrilateral simultaneously.

Finally, we’ll enhance our Logger to support formatted messages using std::format, introduced in C++20. This will allow us to print variable values in a clean and flexible way.

To demonstrate this new functionality, we’ll output the position, rotation, and scale of our quadrilateral directly to the console.

 

You can find the full source code on GitHub here: GitHub Link

I hope you enjoy the tutorial, and thank you for all your support!