gles2: Enable scissor test for optimization.
Skips unnecessary drawcalls outside of the viewable area.
This may happen with textures rendered over the edges of our screen.
@@ -1019,6 +1019,9 @@ impl Renderer for Gles2Renderer {
unsafe {
self.gl.Viewport(0, 0, size.w, size.h);
+ self.gl.Scissor(0, 0, size.w, size.h);
+ self.gl.Enable(ffi::SCISSOR_TEST);
+
self.gl.Enable(ffi::BLEND);
self.gl.BlendFunc(ffi::ONE, ffi::ONE_MINUS_SRC_ALPHA);
}
