One way to reduze flickering is to synchronize the output of the graphics to the monitor and only redraw it if it is in the vertical blank.
Another option is to use a backbuffer. You draw into a copy of the graphics display, and when you are done, put that on the screen.