Skip to main content
GameDev.net gamedev.net
🔒 Locked

Input/Output

Started by daniel_i_l Jun 9, 2006 at 5:44 AM 5 replies 1.3k views
Original Post
daniel_i_l
daniel_i_l
What is a good was to get numbers and words as input using opengl with windows? Thanks.
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the internet, we know this is not true." -- Professor Robert Silensky
mrbastard
mrbastard
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.
[size="1"]
daniel_i_l
daniel_i_l
I'm using the windows API, but I can only input single letters or numbers, how do I input strings or longer numbers?
Thanks.
"We've all heard that a million monkeys banging on a million typewriters will eventually reproduce the entire works of Shakespeare. Now, thanks to the internet, we know this is not true." -- Professor Robert Silensky
Monder
Monder
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.
Rob Loach
Rob Loach
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.
Rob Loach [Website] [Projects] [
7Days
7Days
I do not think that glut is available on every platform, for example I do not think that OpenGL ES support glut librairy.
Ali_B
Ali_B
Before talking about how to input characters, the question is: How do you want to display the characters?

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.