Reference: endDrawing
beginDrawing(0) decreases the common halt index of the 2D and 3D visualization windows by one. Initially, this index is equal to zero, and if it is positive and an object (set, pixmap, geometrical entity, etc.) is added to the window, the window is not redrawn on-screen.