fixed flickering of opengl screen