What steps will reproduce the problem?
1. Take any gl2gx example
2. Comment out the call to glutIdleFunc() in the example
3. Compile and run, when the glutMainLoop() is called, the example will crash
What is the expected output? What do you see instead?
No crash and normal operation.
What version of the product are you using? On what operating system?
Latest, Wii
Please provide any additional information below.
The crash results from the library trying to invoke a NULL function. In
glut.c:
void glutMainLoop(void){
displayfunc();
while(1) {
idlefunc(); //<<< issue here
}
}
One solution, is to check for a NULL, e.g.:
void glutMainLoop(void){
displayfunc();
while(1) {
if (idlefunc != NULL)
idlefunc();
else
some_default_idle_func() //or just sleep here
}
}
Original issue reported on code.google.com by michaelw...@gmail.com on 5 Apr 2009 at 12:45
Original issue reported on code.google.com by
michaelw...@gmail.com
on 5 Apr 2009 at 12:45