I\'ve read a dozen articles online about the correct order of rotation, translation and scale matrix multiplication in OpenGL. However, now that I started implementing it myself
Your C++ matrices are probably stored as row major under the hood. Which means that multiplying them from left to right is an "origin" transformation, while right to left would be a "local" incremental transformation.
OpenGL however uses a column major ordering memory layout (The 13th, 14th and 15th elements in the 16 element array are treated as the translation component).
To use your row major matrices in OpenGL, there are 2 things you can do:
void glUniformMatrix4fv(GLint location, GLsizei count,
GLboolean transpose, const GLfloat *value);
This will re-arrange them to be column major.
gl_Position = vec4(a_Position, 0.0, 1.0) * u_Matrix;
But most GLSL literature you will find will use local left to right column major ordering, so it may be better to stick with that.
Another alternative is to change the layout on the C++ side to make them column major (but I personally think row major is easier to deal with there).