I am wondering if OpenGL allows you to get user input from the terminal in traditional sense (i.e. std::cin>>). My program requires user input on several occasions in its execution, and I would like to know what is the most commonly used means for getting ascii character user input in OpenGL.
OpenGL has nothing to do with user input. It neither inhibits nor aids your ability to use the command line, or any other form of user interface.
The issue that I am facing in that the user input in my program prevents the graphics from displaying. The first part of my program draws a single line. When I comment out the first user input (std::cin) and everything beyond, the line displays normally. Otherwise, all I get is a dark window. Do you have any explanation?
Yes, reading from std:cin blocks your application (at least the current thread) until the requested user input is available. You either want to move your rendering to another thread or use some sort of asynchronous input mechanism like GetAsyncKeyState on Windows.
Thank you for clearing that up. On that note, I am wondering what method I might use to move the rendering to another thread or, alternatively, what asynchronous input mechanism is used on Linux.
You can simply embed you application in any gui? WxWidget is too mainstream?
Then you have dialog, slider, text field.
Otherwise if you need a really easy and simple GUI you can use anttweakbar. link -> http://www.antisphere.com/Wiki/tools:anttweakbar
Hmmmm… I guess wxWidgets would work. The program already uses an X11 window for rendering, so it may be better to simply add GUI to the existing window. Does GLUT have any input options that might work?