Sorry, I misunderstood. "When you rotate" Yes, this can be because of the distance of the nearplane to the camera position.I have came across the same problem before if the actual problem is that. But also there is another problem due to a reason I don't know . I get the result I want only when I make the second parameter 1 when using glm. According to convention of old fixed functionality, this must have been
the width of the screen / the height of the screen.