decla-red/frontend/src/scripts/graphics/graphics-library/compiling/check-shader.ts
schmelczerandras 99f47e2961 Some refactoring
2020-09-14 19:18:59 +02:00

7 lines
226 B
TypeScript

export const checkShader = (gl: WebGL2RenderingContext, shader: WebGLShader) => {
const success = gl.getShaderParameter(shader, gl.COMPILE_STATUS);
if (!success) {
throw new Error(gl.getShaderInfoLog(shader));
}
};