PDA

View Full Version : Problems with glutKeyboardFunc



tampines
05-25-2011, 06:06 AM
//Part of the code
glutDisplayFunc(display);
glutIdleFunc(idle);
glutKeyboardFunc(keyBoard);
glutMainLoop();

The program is working correctly except it responds about one second after I pressed a key(e.g. 't').

Anyone knows why this could happen?

mobeen
05-25-2011, 06:25 AM
Probably, ur idle or display function is taking longer to finish.

tampines
05-26-2011, 11:27 PM
Its seems fine now after adding a glFinish()...