matrix of glviewport

hi, I would like to know what is the equivalent matrix generated by glviewport. Thx a million!

glViewport doesn’t generate a matrix. It basically is just used to take the result of your vertex coordinates after being multiplied by the modelview then the projection matrix, and then determines where in the window coordinates to place it.

If you want the exact formula, it can be found both in MSDN, and the OpenGL specification.