edit: seems that the code that causes your problem does so on purpose. not good.
Code: Select all
for (i = 0; i < 64; i++) {
glPopMatrix();
err = glGetError();
if (err != GL_NONE) {
break; // we're looking for GL_STACK_UNDERFLOW
}
}
edit2: you could comment out that code and see what happens...