* Once all buffers have been bound, this checks to see if there are any * remaining active attributes, likely left over from previous renders, * and disables them so that they don't affect rendering. * @private
(shader)
| 219 | * @private |
| 220 | */ |
| 221 | _disableRemainingAttributes(shader) { |
| 222 | for (const location of this.registerEnabled.values()) { |
| 223 | if ( |
| 224 | !Object.keys(shader.attributes).some( |
| 225 | key => shader.attributes[key].location === location |
| 226 | ) |
| 227 | ) { |
| 228 | this.GL.disableVertexAttribArray(location); |
| 229 | this.registerEnabled.delete(location); |
| 230 | } |
| 231 | } |
| 232 | } |
| 233 | |
| 234 | _drawBuffers(geometry, { mode = constants.TRIANGLES, count }) { |
| 235 | const gl = this.GL; |
no test coverage detected