Tuesday, August 02, 2011

3. OpenGL Keyboard Interaction (Version 2.0) | Swiftless Tutorials

3. OpenGL Keyboard Interaction (Version 2.0) | Swiftless Tutorials: "To get started with the keyboard, just like we created display and reshape methods for GLUT to use, we are going to need to create another method. The first method we are going to deal with is the key pressed method; this method will tell us which keys are currently pressed.

I am going to name this method keyPressed and GLUT states that it has 3 parameters, one for the key that is currently pressed, and two more that give us the location of the mouse when the key was pressed."