I have a question about computer graphics pipeline.
In OpenGL, we usually use glViewport function in reshape callback. I heard glViewport is related to viewport transformation.
In our vertex shader, we usually calculate our vertices and make these vertices to be defined in clipping coordinate(Normalized clipping cube).
When does viewport transformation work?
I guess if the vertex shader output the vertices information to rasterizer, then the pipeline translate these vertices information.
X(v) = (x + 1)/2 * width + left y(v) = (y + 1)/2 * height + bottom. (viewport transformation)
Consequently, I thought glViewport just set how to work viewport transformation after finishing vertex shader work.
Is it right?