Archived

This topic is now archived and is closed to further replies.

Puzzler183

GLUT and the keyboard

Recommended Posts

Well, after hours of debugging I gave up and now have a working template with GLUT, ready to have logic code inserted. Except for one thing. Is there are way to detect multiple keys via GLUT? Perhaps in an array of bools, and turn them on and off? Or will I be forced to push something onto a queue every time I get a key? Does anyone have an altogether different idea? O__O

Share this post


Link to post
Share on other sites
Well I would do that except I haven''t found a way to do key down/key up with GLUT... And I''d prefer to keep this cross platform compatible and not use SDL although I''m thinking that''s what I may have to do...

Share this post


Link to post
Share on other sites
If you are using Glut 3.7(I think), you have access to a glutKeyUpFunc or something like that. I would love to post the code but my harddisk just crashed and i lost most of my code in the process.

But it can definitely be done in GLUT.

Share this post


Link to post
Share on other sites