Why do objects within the viewport translate and scale when I change the position of the viewport and scale it? I am only changing the x,y,w,h of glViewport, not the objects.
There is a rectangle that is drawn inside the viewport to frame the viewport window. This rectangle is drawn in the display() function, where the objects are also drawn.
When I change the x, the rectangle moves left or right, when I change the y the rectangle moves up or down. But so does the object inside the viewport.
Same thing with the viewport size changing w and h.
Can anyone explain why? And, how can I fix this?