I just ran this code, being curious to see OpenGL’s matrix multiplication: main.cpp and I got the following result:

Modelview Identity:

Matrix:

7.92252e+33 5.60519e-45 0 0

5.95171e-39 3.21396e-39 3.21401e-39 3.2142e-39

7.92481e+33 7.8354e+33 NaN 7.92252e+33

7.92254e+33 5.95171e-39 3.21405e-39 5.95186e-39

Modelview Translation of 2, 2, 2:

Matrix:

7.92252e+33 5.60519e-45 0 0

5.95171e-39 3.21396e-39 3.21401e-39 3.2142e-39

7.92481e+33 7.8354e+33 NaN 7.92252e+33

7.92254e+33 5.95171e-39 3.21405e-39 5.95186e-39

Modelview Scaling of 2, 2, 2:

Matrix:

7.92252e+33 5.60519e-45 0 0

5.95171e-39 3.21396e-39 3.21401e-39 3.2142e-39

7.92481e+33 7.8354e+33 NaN 7.92252e+33

7.92254e+33 5.95171e-39 3.21405e-39 5.95186e-39

Projection Identity:

Matrix:

7.92252e+33 5.60519e-45 0 0

5.95171e-39 3.21396e-39 3.21401e-39 3.2142e-39

7.92481e+33 7.8354e+33 NaN 7.92252e+33

7.92254e+33 5.95171e-39 3.21405e-39 5.95186e-39

Projection glOrtho -2.0, 2.0, -2.0, 2.0, -2.0, 2.0:

Matrix:

7.92252e+33 5.60519e-45 0 0

5.95171e-39 3.21396e-39 3.21401e-39 3.2142e-39

7.92481e+33 7.8354e+33 NaN 7.92252e+33

7.92254e+33 5.95171e-39 3.21405e-39 5.95186e-39

Projection glFrustum -2.0, 2.0, -2.0, 2.0, 1.0, 10.0:

Matrix:

7.92252e+33 5.60519e-45 0 0

5.95171e-39 3.21396e-39 3.21401e-39 3.2142e-39

7.92481e+33 7.8354e+33 NaN 7.92252e+33

7.92254e+33 5.95171e-39 3.21405e-39 5.95186e-39

Process returned 0 (0x0) execution time : 0.125 s

Press any key to continue.

Shouldn’t it start with the identity matrix? I have a feeling I made a mistake somewhere.