Jump to content
  • Advertisement
Sign in to follow this  
Spectre1337

OpenGL GLUT & unicode keyboard callback

This topic is 4897 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello. I've been using GLUT for all my OpenGL projects but its limited capabilities are slowly starting to show themselves. This one is tough. I want to let the user input text in any foreign language, so obviously I need an Unicode text renderer. I have FreeType. Check! But now I need to get valid unicode messages from my keyboard. glutKeyboardFunc only captures ASCII 0-255 keys and glutSpecialFunc is useless. I want to keep my application 100% platform independent, so what should I do? Is there a way to catch unicode keys through GLUT, or is there another way that works across all major platforms?

Share this post


Link to post
Share on other sites
Advertisement
Well one thing that you could take a look into is providing a menu to which the user can select characters from and have access to unicode that way. I doubt you really want to do that, but id you do you can take a look at something like GLT (Glut with extras basically, but not the same format) They have a sample here under the "Text Demo". Other than that, I haven't seen much more with GLUT itself, you might want to think about porting your code over to something with more Unicode support perhaps. Something like SDL does have Unicode support as does GLFW. Good luck!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!