// All material copyright Esri, All Rights Reserved, unless otherwise specified. // See https://js.arcgis.com/4.30/esri/copyright.txt for details. //>>built define(["exports","../../core/has","./checkWebGLError","./enums","./getDataTypeBytes"],function(h,t,q,a,r){function n(b){b=b.gl;switch(b.getError()){case b.NO_ERROR:return null;case b.INVALID_ENUM:return"An unacceptable value has been specified for an enumerated argument";case b.INVALID_VALUE:return"An unacceptable value has been specified for an argument";case b.INVALID_OPERATION:return"The specified command is not allowed for the current state";case b.INVALID_FRAMEBUFFER_OPERATION:return"The currently bound framebuffer is not framebuffer complete"; case b.OUT_OF_MEMORY:return"Not enough memory is left to execute the command";case b.CONTEXT_LOST_WEBGL:return"WebGL context is lost"}return"Unknown error"}function p(b){return b[0].stride}h.bindVertexBufferLayout=function(b,k,g,d,l=0){const f=b.gl;b.bindBuffer(g);for(const c of d)if(d=k.get(c.name),void 0===d)console.warn(`There is no location for vertex attribute '${c.name}' defined.`);else{g=l*c.stride;if(4>=c.count)f.vertexAttribPointer(d,c.count,c.type,c.normalized,c.stride,c.offset+g),f.enableVertexAttribArray(d), 0e;e++)f.vertexAttribPointer(d+e,3,c.type,c.normalized,c.stride,c.offset+12*e+g),f.enableVertexAttribArray(d+e),0e;e++)f.vertexAttribPointer(d+e,4,c.type,c.normalized,c.stride,c.offset+16*e+g),f.enableVertexAttribArray(d+e),0=f.count)l.disableVertexAttribArray(g),f.divisor&&0d;d++)l.disableVertexAttribArray(g+d),f.divisor&&0d;d++)l.disableVertexAttribArray(g+d),f.divisor&&0