fix bug for reset view port for opengl