Let say, we use double buffering. We first write the frame into the back buffer, then it will be swap into the front buffer to be displayed.
There are 2 scenario here, which I assume have the same outcome.
Assume we clear the back buffer, we then write a new frame to back buffer. Swap it into the front buffer.
Now assume we didn't clear the back buffer, the back buffer will be overwritten with a new frame anyway. Lastly both buffer will be swapped.
Thus, assuming I was right and provided we use double buffering, whether clearing or not clearing buffer, both will then end up with the same display, is that true?
Will there be any possible rendering artifacts, if we didn't clear the buffer?
The key of the second approach is in this assumption:
I assume we are talking about OpenGL frame buffer which contains Color values, Depth, Stencil and etc. How exactly will they be overwritten in next frame?
Rendering code does constant depth comparisons, so see which objects need to be drawn. With old frame depth data it will be all messed up. Same happens if you render any semi-transparent items, with blending enabled.
Clearing buffer is fastest way to reset everything to ground zero (or any other specific value you need).
There are techniques that rely on buffer not being cleared (considering this is verified to be a costly operation on a platform). For example not having transparent geometry without opaque behind it, and toggling depth-test less/greater in 0-0.5 / 0.5-1.0 ranges to make it always overwrite old frames values.