It doesn’t look like what I expect.
The real matrix isn’t this?
-0.707107, -0.5, 0.5, 0
0.707107, -0.5, 0.5, 0
0,0.707107,0.707107,-1000
0, 0, 0, 1
Or what I get is the transposed?
No, you’re transposing it in your printing function. Matrices in OpenGL are column-major. The first 4 elements are the first column, the next 4 are the next column, etc.
It would be easier to just change your printing function. By doing what you’re doing, you’re transposing the matrix by doing this. Though that may be what you want, if your matrix conventions are row-major and you want to use this matrix in your code.