Skip to content

scenes/opengl: Use hardware clipping for clearing the background

Arjen Hiemstra requested to merge work/ahiemstra/hardwareclip into master

Right now, when paintBackground() is called to clear the background, we use custom geometry and render that when the damage region isn't infinite. Rather than using geometry, we can instead use glScissor() to set the area that needs to be cleared and then use glClear() to clear it.

In addition, if we have only one rect in the damage region and that rect matches the render target rect, we can completely skip all that setup and use glClear() directly.

Merge request reports