View Full Version : Problem with glutKeyboardFunc

11-15-2012, 08:20 AM
Hello community

I start a little 3D software.

I use my keyboard to change the shape to display (ex : press '1' to display the A shape, press '2' to display the B shape, ....)
To be sure I use in the function printf to display the pressed key.

So when I press a key, the key is not printed in the standard output and the shape is not changed.

But when I close the program, the outputs are printed at once.

I don't understand what to do to correct the problem......

Thank you for your help.

The Little Body
12-05-2012, 03:36 PM
Hello, Flow91

I think that your problem is relative to how/where you have used the glutKeyboardFunc( myKeyboardFunc ) func and/or the implementation of your myKeyboardFunc(int key, int x, int y)

Could you please post the source of your little 3D software for that we can see where is the problem ?