Skip to content

Commit

Permalink
Merge 1d92221 into 9f0e708
Browse files Browse the repository at this point in the history
  • Loading branch information
unconed committed Aug 22, 2020
2 parents 9f0e708 + 1d92221 commit 05a8a51
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/webgl/src/classes/program.js
Original file line number Diff line number Diff line change
Expand Up @@ -338,11 +338,16 @@ export default class Program extends Resource {

// Avoid checking program linking error in production
if (gl.debug || log.level > 0) {
gl.validateProgram(this.handle);
const linked = gl.getProgramParameter(this.handle, gl.LINK_STATUS);
if (!linked) {
throw new Error(`Error linking: ${gl.getProgramInfoLog(this.handle)}`);
}

gl.validateProgram(this.handle);
const validated = gl.getProgramParameter(this.handle, gl.VALIDATE_STATUS);
if (!validated) {
throw new Error(`Error validating: ${gl.getProgramInfoLog(this.handle)}`);
}
}
}

Expand Down

0 comments on commit 05a8a51

Please sign in to comment.