outsource async fetching
This commit is contained in:
parent
618a3aec23
commit
1683d2bbe9
3 changed files with 42 additions and 30 deletions
|
|
@ -127,9 +127,9 @@ class Smc {
|
|||
|
||||
setProgram(delegate) {
|
||||
const builder = new SmcProgramBuilder(this.#gl, this.raiseError);
|
||||
delegate(builder); // i pray js passes by ref well...
|
||||
var result = delegate(builder);
|
||||
|
||||
this.#program = builder.build();
|
||||
this.#program = result.build();
|
||||
if (!this.#gl.getProgramParameter(this.#program, this.#gl.LINK_STATUS)) {
|
||||
const infoLog = this.#gl.getProgramInfoLog(this.#program);
|
||||
this.raiseError(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue