How to implement this without Glut

For example, I used glutIdleFunc(), sleep() and glFlush() to print some letters one by one on the graphics. I also used single buffer to make it work.

If I can not use glut, how can it work at the same way? Any simple sample codes? Nehe has too much codes…


It all depends on your OS…

On windows you can replace the glutIdle() with an idle handler in the message loop (win32) or using the Idle() method (MFC).

Sleep() is used to do delays the ugly way.

And glFlush is already on OpenGL function.
(SwapBuffers is used to handle doublebuffering on Windows).


There are many way’s in which to create the effect you want, but depending on what you want to program to do in the future. How you are doing it now will limit you options.

GLUT is the simplest way to create an openGL program. If you are having trouble with using GLUT, then you may want to study more.

I think that a better understanding of how openGL and programming in general would help you with this.

Start with nehe’s tutor 1 and work your way up, to get a better understanding of programming openGL.


You can replace the glutIdleFunc with TimerFunc. That will work.