Glitches when drawing an object that extends beyond the screen