(type, source, keywords)
| 206 | } |
| 207 | |
| 208 | function compileShader(type, source, keywords) { |
| 209 | source = addKeywords(source, keywords); |
| 210 | const shader = gl.createShader(type); |
| 211 | gl.shaderSource(shader, source); |
| 212 | gl.compileShader(shader); |
| 213 | if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) console.trace(gl.getShaderInfoLog(shader)); |
| 214 | return shader; |
| 215 | } |
| 216 | |
| 217 | function addKeywords(source, keywords) { |
| 218 | if (!keywords) return source; |
no test coverage detected