MCPcopy
hub / github.com/processing/p5.js / _disableRemainingAttributes

Method _disableRemainingAttributes

src/webgl/p5.RendererGL.js:221–232  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

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;

Callers 4

_renderPassMethod · 0.45
_drawFillsMethod · 0.45
_drawStrokesMethod · 0.45
textFunction · 0.45

Calls 1

deleteMethod · 0.80

Tested by

no test coverage detected