/* COPYRIGHT Esri - https://js.arcgis.com/5.1.0/LICENSE.txt */
class t{constructor(t,r){this._material=t,this._repository=r}dispose(){null!=this._glMaterial&&this._repository.release(this._material)}load(t,r,e){const i=this._material.produces.get(r);if(!i?.(e))return null;if(this._glMaterial??=this._repository.acquire(this._material,r,e),this._glMaterial){if(2===this._glMaterial.ensureResources(t))return this._glMaterial;this._repository.requestRender()}return null}}export{t as GLMaterialLoader};
