PDA

View Full Version : Return from callback



Mukund
05-15-2010, 01:47 PM
Hello everyone.

Im new to OpenGL.Can anyone tell me where exactly does a return from a callback function go to??

ie

for eg, this is my keyboard callback,


void KeyBoardCallBack(unsigned char c, int x, int y){
return;
}

Now where will this be returned to?Can anyone please explain?

Thanks in advance.

todayman
05-16-2010, 10:07 AM
Presumably, you're using some library that provides keyboard input, such as GLUT. When your setting up the windows and other stuff, you'll specify this function as the keyboard callback. When the library finds out that a keyboard event happened, it calls this function. When this function is done, it returns back to the library.

Mukund
05-16-2010, 03:02 PM
Yes im using GLUT.Thanks for the reply.