You're confusing the screen (the physical display) with the framebuffer (the memory which gets read out by the display controller). The framebuffer might get cleared at the start of each frame period, but that doesn't change the display. The order of events is as follows:
- At the start of a new frame,
glClear
or equivalent sets the framebuffer to the clear colour.
glDraw
or equivalent calls draw more stuff on top of the clear colour.
eglSwapBuffers
or equivalent queues the finished frame to be drawn on the display.
- When the display is ready, this process is followed. It reads out the contents of the framebuffer and shows them on the physical screen.
The framebuffer that's being drawn into is never shown on the screen; only when it's finished can it be shown. Double- or triple-buffering gives you multiple copies of the framebuffer, so the application can be using one while the display is using the other. It's nothing to do with your eyes or brain.
It's actually a lot more complicated than this, because most GL implementations today are not immediate-mode, so none of the real work happens when you call the functions named above. In fact, clearing the buffer might not even happen at all: if every pixel is drawn to anyway, there's no need to. Back when clearing the framebuffer took significant time, games would go faster by not calling glClear
. Today it's more important to call glClear
because it lets the implementation know when the start of the new frame is, but it will probably do something smarter than just writing to every pixel.