It's technically not an error but unnecessary and redundant. glViewport() does not alter the matrix stack. You need only change the current if you actually involve matrix manipulation functions, like gluPerspective(), glFrustum(), glOrtho(), glLoadIdentity() and so on. In any case, setting the matrix mode to GL_PROJECTION twice in a row without any switch to another matrix stack, like GL_MODELVIEW, is a redundant state change. In the init function it doesn't really make a difference but if this scheme becomes a habit and you introduce a lot of redundant state changes into performance critical code, you'll probably see performance drops. Remember that for the future.