Fix rendertarget rendering (OpenGL)

This is a followup to #1399

Also changed the behavior for the default  colorbuffer after being displayed (discarded instead of preserved).