gl.scissor
gl.enable(gl.SCISSOR_TEST)
gl.scissor(x, y, width, height)
const gl = document.querySelector("canvas").getContext("webgl");
gl.enable(gl.SCISSOR_TEST);
gl.scissor(50, 25, 150, 75);
gl.clearColor(1, 0, 0, 1);
gl.clear(gl.COLOR_BUFFER_BIT); // notice the entire canvas is not cleared
canvas { border: 1px solid black; }
<canvas></canvas>
gl.viewport
gl.clear
gl_Position
gl_PointSize = 10.0