This call to ``check_error`` is to flush any errors, otherwise it seems as though they are caused by `glBufferSubData` while they're not. The argument "periodic check" is just to provide a context for the error message (if any).