GL11.glMatrixMode(GL11.GL_PROJECTION);GL11.glLoadIdentity();// reset your view hereGL11.glMatrixMode(GL11.GL_MODELVIEW);GL11.glLoadIdentity();// back to rendering!
You are probably in the modelview (i.e. rendering) matrix when you call those functions. You need to go back into the projection matrix to re-adjust the viewport.Code: [Select]GL11.glMatrixMode(GL11.GL_PROJECTION);GL11.glLoadIdentity();// reset your view hereGL11.glMatrixMode(GL11.GL_MODELVIEW);GL11.glLoadIdentity();// back to rendering!