so, is it glut?
If so, you better call glutPostRedisplay whenever you want to render the whole thing, instead of explicitly calling the render function. You have to call glutDisplayFunc too at initialization with the render function as the argument, of course.
This is just some bugfix, you really should decouple logic from rendering.