// 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/Logger ../../core/maybe ../../core/typedArrayUtil ./enums ./Util".split(" "),function(g,m,n,p,h,q){const c=()=>m.getLogger("esri.views.webgl.VertexArrayObject");g.VertexArrayObject=class{constructor(a,b,d,e,f=null){this._context=a;this._locations=b;this._layout=d;this._buffers=e;this._indexBuffer=f;this._glName=null;this._initialized=!1}get glName(){return this._glName}get context(){return this._context}get vertexBuffers(){return this._buffers}get indexBuffer(){return this._indexBuffer}get byteSize(){return Object.keys(this._buffers).reduce((a, b)=>a+this._buffers[b].usedMemory,null!=this._indexBuffer?this._indexBuffer.usedMemory:0)}get layout(){return this._layout}get locations(){return this._locations}get usedMemory(){return this.byteSize+(Object.keys(this._buffers).length+(this._indexBuffer?1:0))*p.typedArrayStaticSize}dispose(){if(this._context){this._context.getBoundVAO()===this&&this._context.bindVAO(null);for(const a in this._buffers)this._buffers[a]?.dispose(),delete this._buffers[a];this._indexBuffer=n.disposeMaybe(this._indexBuffer); this.disposeVAOOnly()}else(this._glName||0