I'm having trouble wrapping my head around how these work. First, in a 2d game the projection matrix should be set up as ortho with left, right, top, bottom matching the window, right? But when the window resizes, should I just change glViewport, not the projection matrix? And how do I keep the aspect ratio?
Could someone explain the purposes of these two things, in 2d orthographical game, so that I can understand it better?
It feels like OpenGL is doing a lot of useless stuff in a 2d setup. Rasterizing and calculating fragments when the images are already there, converting vertex coordinates to NDC only to be converted back to what they already where by glViewport.
Also, how come in legacy free OpenGL we have to make our own matrices, but not our own calculations that glViewport does?
Thanks.