JCheng
1
I got the stop message of Microsoft Windows once looping with the recurring function loop as below:
void xTimer(void)
{
if (xxx==1|yyy==1){
xxx=0;yyy=0;
}
else xTimer();
}
Please advise if anything is wrong. Tks
Yes, here is what is wrong : this has nothing to do with OpenGL.
What about learning about “while loop in C” thanks to any search engine ?
JCheng
4
It seems the problem doesn’t fixed, even “||” is used. For more info, see part of my problem:
GLint xxx=0,yyy=0;
void SpecialKeys(int key, int x, int y)
{
if(key == GLUT_KEY_UP|key==GLUT_KEY_F1)
xxx=1;
if(key == GLUT_KEY_DOWN|key==GLUT_KEY_F2)
yyy=1;
}
void xTimer(void)
{
if (xxx==1||yyy==1){
xxx=0;yyy=0;
}
else xTimer();
}
Please advise any comment. Tks.
Your problem seems to be one of not understanding basic programming concepts, not OpenGL.
Your recursive function has no terminating case.