Getting User Input

Hi all,

I want to get user input (some coordinate values) from console and use the user input values to display a circle at the particular coordinate.

Currently I tried to do this by using scanf() and some global variables as the coordinate values but the method crashed my program.

So was wondering if any of you guys could provide me some advice on how to go about doing this since this my first time with OpenGL and not really sure how the library works.

I am working on a Linux (Ubuntu 9.04) machine with gcc/g++ compiler and use GLUT for window management.

Thanks in advance.



OpenGL doesn’t have any functionality for obtaining user input; it’s graphics only. You’ll need to use an OS library or other framework.