add some functions for displaying by openGL and simplest fps control