on the first click, call glutTimerFunc and set a boolean variable (waiting_for_another_click) to true.
on the second click, if waiting_for_another_click==true then that were a double click.
obviously, you have to reset waiting_for_another_click to false when the timer func is called.
2 milliseconds is very short. try 250 milliseconds instead.
hi.
you have to call glutTimerFunc each time you want to check a double click, not just in the main function
the value parameter is passed to the callback at the end of msecs milliseconds.
using this value, you are able to define mutliple timer which use the same function but according to value, perform different operations.