I’m having a strange problem, in my keyboard down function I have this:
if(!_keyboardDown[key])
{
_keyboardPressed[key]=true;
}
_keyboardDown[key]=true;
In my keyboard up function I have this:
_keyboardDown[key]=false;
Then at the end of the timer func I call this:
for(int ii=0;ii<256;++ii)
{
_keyboardPressed[ii]=false;
}
For some reason when I check if a key is pressed it will reset its self, when it is supposed to return true if it is not already down, at the end of timer set to false, but this isn’t working… I’m not sure what is wrong…
EDIT:
I figured it out, set glutSetKeyRepeat() to GLUT_KEY_REPEAT_OFF…