how to give user input through keyboard/mouse when a continuous loop is exceuted ?

Hi ,
We are trying to display molecules at different time frames and we want to user to be able to vary some display parameters ,after a time frame.But the display function
exceutes everything at a stretch.

how to give input to the program and if no input is given , the program should run with its default values.

thank you.


[This message has been edited by arnott (edited 05-15-2000).]

The thing to do is to read the input in your loop.


if you use Win32. When you make your loop, test to see if there is a message in the message queue. If there is one process it. In the message queue, you’ll get all the input of the users, system calls, etc.

I suggest you go take a look at some tutorials that draws and have input.

This nehe’s page, the tutorials are for opengl, but by looking at them, you’ll understand a way to do input.

Also see the back section in the OpenGl SuperBible on multithreading and real-time application programming. Exactly what you are looking for.