Sign in to follow this  
daniel_i_l

OpenGL Input/Output

Recommended Posts

Opengl doesn't do input.

You could use the win32 API as you're on windows, or directinput, or SDL, or several other things.

In general input is provided by the OS interaction layer you use.

Share this post


Link to post
Share on other sites
I'm using the windows API, but I can only input single letters or numbers, how do I input strings or longer numbers?
Thanks.

Share this post


Link to post
Share on other sites
Well if you can get each key the user presses then you can get strings by putting the characters together. E.g. keep adding keys the user presses to a string (you'll need to handle non-printable keys, like the arrow keys) until they hit enter or something.

Share this post


Link to post
Share on other sites
I'd strongly suggest moving away from the Windows API and using a third party library like GLFW or FreeGLUT. Using these frameworks will not only make your life easier, but also let you port your applications to platforms other then Windows.

Share this post


Link to post
Share on other sites
I do not think that glut is available on every platform, for example I do not think that OpenGL ES support glut librairy.

Share this post


Link to post
Share on other sites
Before talking about how to input characters, the question is: How do you want to display the characters?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this