Some refactoring
This commit is contained in:
parent
a51c06ae7b
commit
99f47e2961
1 changed files with 72 additions and 113 deletions
|
|
@ -0,0 +1,7 @@
|
|||
export const checkShader = (gl: WebGL2RenderingContext, shader: WebGLShader) => {
|
||||
const success = gl.getShaderParameter(shader, gl.COMPILE_STATUS);
|
||||
|
||||
if (!success) {
|
||||
throw new Error(gl.getShaderInfoLog(shader));
|
||||
}
|
||||
};
|
||||
Loading…
Reference in a new issue