Skip to content

Commit

Permalink
Unbind buffer after set data
Browse files Browse the repository at this point in the history
  • Loading branch information
cyyyu committed Nov 3, 2019
1 parent 569f8ad commit 19382a0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Line.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 424,7 @@ export default class Line {
);
gl.vertexAttribPointer(positionLoc, 2, gl.FLOAT, false, 0, 0);
gl.enableVertexAttribArray(positionLoc);
gl.bindBuffer(gl.ARRAY_BUFFER, null);

this.lineVAO = lineVAO;
this.lineShader.setNumOfIndices(lineIndices.length);
Expand Down Expand Up @@ -455,6 456,7 @@ export default class Line {
);
gl.vertexAttribPointer(positionLoc, 2, gl.FLOAT, false, 0, 0);
gl.enableVertexAttribArray(positionLoc);
gl.bindBuffer(gl.ARRAY_BUFFER, null);

this.overlayVAO = overlayVAO;
this.overlayShader.setNumOfIndices(overlayIndices.length);
Expand Down

0 comments on commit 19382a0

Please sign in to comment.