/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
import{loadRendererInfo as e}from"./DebugRendererInfo.js";import{createDisjointTimerQuery as t}from"./DisjointTimerQuery.js";import{loadCompressedTextureETC as s,loadCompressedTextureS3TC as r,loadTextureFilterAnisotropicCapability as i,loadColorBufferFloat as l,loadTextureNorm16 as o,loadBooleanExtension as n,loadDrawBuffersIndexed as h}from"./load.js";import{load as _}from"./LoseContext.js";class u{constructor(e,t){this._gl=e,this._compressedTextureETC=null,this._compressedTextureS3TC=null,this._textureFilterAnisotropic=null,this._colorBufferFloat=null,this._loseContext=null,this._textureNorm16=null,this._textureFloatLinear=null,this._parallelShaderCompile=null,this._rendererInfo=null,this._drawBuffersIndexed=null,this._disabledExtensions=t.disabledExtensions,this._debugWebGLExtensions=t.debugWebGLExtensions}get compressedTextureETC(){return this._compressedTextureETC??=s(this._gl,this._disabledExtensions),this._compressedTextureETC}get compressedTextureS3TC(){return this._compressedTextureS3TC??=r(this._gl,this._disabledExtensions),this._compressedTextureS3TC}get textureFilterAnisotropic(){return this._textureFilterAnisotropic??=i(this._gl,this._disabledExtensions),this._textureFilterAnisotropic}get disjointTimerQuery(){return this._disjointTimerQuery??=t(this._gl,this._disabledExtensions),this._disjointTimerQuery}get colorBufferFloat(){return this._colorBufferFloat??=l(this._gl,this._disabledExtensions),this._colorBufferFloat}get textureNorm16(){return this._textureNorm16??=o(this._gl,this._disabledExtensions),this._textureNorm16}get textureFloatLinear(){return this._textureFloatLinear??=n(this._gl,this._disabledExtensions,"textureFloatLinear",!1,["OES_texture_float_linear"]),this._textureFloatLinear}get parallelShaderCompile(){return this._parallelShaderCompile??=n(this._gl,this._disabledExtensions,"parallelShaderCompile",!1,["KHR_parallel_shader_compile"]),this._parallelShaderCompile}get loseContext(){return this._loseContext??=_(this._gl,this._debugWebGLExtensions),this._loseContext}get rendererInfo(){return this._rendererInfo??=e(this._gl),this._rendererInfo}get drawBuffersIndexed(){return this._drawBuffersIndexed??=h(this._gl,this._disabledExtensions),this._drawBuffersIndexed}enable(e){return this[e]}}export{u as Capabilities};
