Skip to content

Commit 71706f0

Browse files
committed
Merge pull request #9 from abiro/master
Fix bug with first draw call
2 parents c0c6bc2 + e35cbd6 commit 71706f0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,14 @@ GLGeometry.prototype.bind = function bind(shader) {
9898
this.update()
9999
this._vao.bind()
100100

101-
if (!shader) return
102-
shader.bind()
103-
104101
if (!this._keys) return
105102
for (var i = 0; i < this._keys.length; i++) {
106103
var attr = shader.attributes[this._keys[i]]
107104
if (attr) attr.location = i
108105
}
106+
107+
if (!shader) return
108+
shader.bind()
109109
}
110110

111111
GLGeometry.prototype.draw = function draw(mode, start, stop) {

0 commit comments

Comments
 (0)