TolTol
12-12-2002, 12:11 AM
Hi all,
I have a bit of a problem. I what to pass an extra parameter to glutKeyboardFunc.
Showing the code will make it easier to explain:
glutKeyboardFunc(myKeyboard);
void myKeyboard(unsigned char thekey, int x,int y){
array_of_bool[thekey]=true;
}
The problem is that I cant find any way of passing array_of_bool to myKeyboard.
I cant declare array_of_bool as a global .
Any suggestions on how to pass array_of_bool to the function???
Thanks in advance.
[This message has been edited by TolTol (edited 12-12-2002).]
I have a bit of a problem. I what to pass an extra parameter to glutKeyboardFunc.
Showing the code will make it easier to explain:
glutKeyboardFunc(myKeyboard);
void myKeyboard(unsigned char thekey, int x,int y){
array_of_bool[thekey]=true;
}
The problem is that I cant find any way of passing array_of_bool to myKeyboard.
I cant declare array_of_bool as a global .
Any suggestions on how to pass array_of_bool to the function???
Thanks in advance.
[This message has been edited by TolTol (edited 12-12-2002).]