(gl)
| 68 | // Utility class for drawing. |
| 69 | class FullscreenQuad { |
| 70 | constructor(gl) { |
| 71 | this.squareVerticesBuffer_ = gl.createBuffer(); |
| 72 | gl.bindBuffer(gl.ARRAY_BUFFER, this.squareVerticesBuffer_); |
| 73 | gl.bufferData( |
| 74 | gl.ARRAY_BUFFER, Float32Array.from([-1, -1, 1, -1, -1, 1, 1, 1]), |
| 75 | gl.STATIC_DRAW); |
| 76 | |
| 77 | this.textureVerticesBuffer_ = gl.createBuffer(); |
| 78 | gl.bindBuffer(gl.ARRAY_BUFFER, this.textureVerticesBuffer_); |
| 79 | gl.bufferData( |
| 80 | gl.ARRAY_BUFFER, Float32Array.from([0, 0, 1, 0, 0, 1, 1, 1]), |
| 81 | gl.STATIC_DRAW); |
| 82 | |
| 83 | this.gl_ = gl; |
| 84 | } |
| 85 | |
| 86 | // Draws a quad covering the entire bound framebuffer. |
| 87 | draw() { |
nothing calls this directly
no outgoing calls
no test coverage detected