Problem with glutKeyboardFunc

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.
F.

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 ?

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.