Skip to content

Commit

Permalink
Merge pull request #218 from stwind/fix/shader-unbind-attr
Browse files Browse the repository at this point in the history
fix(webgl): `disableVertexAttribArray` in `Shader.unbind`
  • Loading branch information
postspectacular authored Apr 11, 2020
2 parents 9a23fa2 + d3eab37 commit 9f0d7f0
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/webgl/src/shader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ export class Shader implements IShader {
}

unbind() {
for (let id in this.attribs) {
if ((shaderAttrib = this.attribs[id]))
this.gl.disableVertexAttribArray(shaderAttrib.loc);
}
}
this.gl.useProgram(null);
return true;
}
Expand Down

0 comments on commit 9f0d7f0

Please sign in to comment.