(gl: WebGLRenderingContext, program: WebGLProgram)
| 148 | } |
| 149 | |
| 150 | export function linkProgram(gl: WebGLRenderingContext, program: WebGLProgram) { |
| 151 | callAndCheck(gl, () => gl.linkProgram(program)); |
| 152 | if (env().get('ENGINE_COMPILE_ONLY')) { |
| 153 | return; |
| 154 | } |
| 155 | if (gl.getProgramParameter(program, gl.LINK_STATUS) === false) { |
| 156 | console.log(gl.getProgramInfoLog(program)); |
| 157 | throw new Error('Failed to link vertex and fragment shaders.'); |
| 158 | } |
| 159 | } |
| 160 | |
| 161 | /// validateProgram is effectively "If we `useProgram(program); drawArrays();`, |
| 162 | /// give feedback in log about perf/correctness warnings or errors that would |
nothing calls this directly
no test coverage detected
searching dependent graphs…