Original Post
I've written a small GLUT Program that draws a small box descending from the top of the screen to the bottom at a constant rate. the function, void drop(), is registered to the glutIdleFunc() function, and is implemented like this: void drop() { sleep(1); // reassign vertice coordinates.... glutPostRedisplay(); } The sleep() function, declared in unistd.h, is a unix system call (I think). Anyway, it works, however, I've defined another function void move(), registered to the glutKeyboardFunc() function, which shifts the box up, down, left, and right depending on the keyboard input. The problem is, while the sleep() function is running, the program is unresponsive to user input. So my question is, what's the work around? Will I have to multithread the app, or is there a better way to do it all together?