'Replicating 2.5d y-shearing in GLUT/FreeGLUT

I am using FreeGLUT to make a 3D engine for my future games, purely because it is easier to deal with than modern OpenGL, the intention is to be a simple engine that has similar features to the IDTech1/ACKNEX-3/Build Engine.

Until now I have been using a projection matrix like any normal 3D engine, consequently the 2.5D engine look that is targeted is not achieved, especially when rendering sprites on the map as the player looks up and down, they distort instead of keeping the straight proportion. To mitigate this, instead of just locking the camera so that the player can't look up and down, I decided it was better to try to replicate the y-shearing effect that the old engines had to disguise the "true 3D" projection.

Unfortunately, I have not found any material on methods to help me do this, is it not possible to replicate such an effect in GLUT?

"True 3D" projection / 2.5D projection with y-shearing (desired):



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source