@arcgis/core
Version:
ArcGIS Maps SDK for JavaScript: A complete 2D and 3D mapping and data visualization API
6 lines (5 loc) • 2.08 kB
JavaScript
/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.32/esri/copyright.txt for details.
*/
import{loadDebugRendererInfo as e}from"./DebugRendererInfo.js";import{createDisjointTimerQuery as t}from"./DisjointTimerQuery.js";import{loadCompressedTextureETC as s,loadCompressedTextureS3TC as r,loadTextureFilterAnisotropicCapability as i,loadColorBufferFloat as o,loadTextureNorm16 as n,loadBooleanExtension as l}from"./load.js";import{load as u}from"./LoseContext.js";class _{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._debugRendererInfo=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??=o(this._gl,this._disabledExtensions),this._colorBufferFloat}get textureNorm16(){return this._textureNorm16??=n(this._gl,this._disabledExtensions),this._textureNorm16}get textureFloatLinear(){return this._textureFloatLinear??=l(this._gl,this._disabledExtensions,"textureFloatLinear",!1,["OES_texture_float_linear"]),this._textureFloatLinear}get loseContext(){return this._loseContext??=u(this._gl,this._debugWebGLExtensions),this._loseContext}get debugRendererInfo(){return this._debugRendererInfo??=e(this._gl,this._debugWebGLExtensions),this._debugRendererInfo}enable(e){return this[e]}}export{_ as Capabilities};