• Advertisement

Archived

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

Basic GLUT programming

This topic is 6521 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

Hi, firstly I would like to say a big thankyou to all the guys that has helped me in the past.CHEERS!!!! I`ve only just moved from using AllegroGL to proper Opengl - suddenly I`ve got to think about windows programming and C++ with classes. I`m well out of my depth, but I can understand GL pretty well, I`ve decided on using GLUT as for the time it will shield me from all the nasty windows setup stuff. I want to convert some of the demos that can be found on the net - to glut as a training exercise (NeHe, Nates etc) My problem lies with the keyboard, I cannot use the standard glut keyboard function as this does not get called every frame update and results in a very slow response. I`ve been informed that I could use "GetAsyncKeyState" in the idle function - trouble is I just cannot get the damn thing to work. Would somebody please be so kind as to write me the code I would need to check if the `q` key or right mouse button was pressed. I guess it`s time I invested in some easy windows programming books! THANKS.

Share this post


Link to post
Share on other sites
Advertisement
Hello! The problem you are having as i understand it is with the keyboard caching, and this can be solved by recording the users keystrokes before any redraw. This way, you could insert smoe code into the gl routine before the page gets drawn to screen, that would tell it to skip some of the keyes, if it was the sam key. Let me know if you still need help with the source-

bitburd
www.darkspiresoft.com

Share this post


Link to post
Share on other sites

  • Advertisement