regl
regl copied to clipboard
regl.clear({scissor})
Sometimes we deal with clearing just a part of canvas, as in parcoords example.
var gl = regl._gl;
gl.enable(gl.SCISSOR_TEST);
gl.scissor(x, y, width, height);
regl.clear({color: [0, 0, 0, 0], depth: 1});
That does not seem like a regl way. Possibly enabling scissor
property for regl.clear
would be a nice improvement:
regl.clear({color: [0,0,0,0], scissor: [x,y, width,height]})
Related to #425
This is a reasonable enhancement and would be a good first issue.
CC @gregtatum
I will take this in the next week or two.
Also on the first point: you could create a scope to set the scissor box.