UNPKG

@doegis/core

Version:

DOE GIS API

3 lines (1 loc) 3.71 kB
import{createDisjointTimerQuery as t}from"./DisjointTimerQuery.js";import{load as e}from"./DrawBuffers.js";import{load as s}from"./Instancing.js";import{loadCompressedTextureETC as i,loadCompressedTextureS3TC as r,loadTextureFilterAnisotropicCapability as n,loadTextureFloat as h,loadColorBufferFloat as l,loadMinMaxBlending as _,loadBooleanExtension as o,loadTextureNorm16 as a}from"./load.js";import{load as u}from"./LoseContext.js";import{load as d}from"./VertexArrayObjects.js";class x{constructor(t,e){this._gl=t,this._instancing=null,this._vertexArrayObject=null,this._compressedTextureETC=null,this._compressedTextureS3TC=null,this._textureFilterAnisotropic=null,this._textureFloat=null,this._colorBufferFloat=null,this._minMaxBlending=null,this._loseContext=null,this._drawBuffers=null,this._textureNorm16=null,this._depthTexture=null,this._standardDerivatives=null,this._shaderTextureLOD=null,this._fragDepth=null,this._textureFloatLinear=null,this._disabledExtensions=e.disabledExtensions||{},this._debugWebGLExtensions=e.debugWebGLExtensions||{}}get drawBuffers(){return this._drawBuffers||(this._drawBuffers=e(this._gl,this._disabledExtensions)),this._drawBuffers}get instancing(){return this._instancing||(this._instancing=s(this._gl)),this._instancing}get vao(){return this._vertexArrayObject||(this._vertexArrayObject=d(this._gl,this._disabledExtensions)),this._vertexArrayObject}get compressedTextureETC(){return this._compressedTextureETC||(this._compressedTextureETC=i(this._gl,this._disabledExtensions)),this._compressedTextureETC}get compressedTextureS3TC(){return this._compressedTextureS3TC||(this._compressedTextureS3TC=r(this._gl,this._disabledExtensions)),this._compressedTextureS3TC}get textureFilterAnisotropic(){return this._textureFilterAnisotropic||(this._textureFilterAnisotropic=n(this._gl,this._disabledExtensions)),this._textureFilterAnisotropic}get disjointTimerQuery(){return this._disjointTimerQuery||(this._disjointTimerQuery=t(this._gl,this._disabledExtensions)),this._disjointTimerQuery}get textureFloat(){return this._textureFloat||(this._textureFloat=h(this._gl,this._disabledExtensions)),this._textureFloat}get colorBufferFloat(){return this._colorBufferFloat||(this._colorBufferFloat=l(this._gl,this._disabledExtensions)),this._colorBufferFloat}get blendMinMax(){return this._minMaxBlending||(this._minMaxBlending=_(this._gl,this._disabledExtensions)),this._minMaxBlending}get depthTexture(){return null===this._depthTexture&&(this._depthTexture=o(this._gl,this._disabledExtensions,"depthTexture",!0,["WEBGL_depth_texture","MOZ_WEBGL_depth_texture","WEBKIT_WEBGL_depth_texture"])),this._depthTexture}get standardDerivatives(){return null===this._standardDerivatives&&(this._standardDerivatives=o(this._gl,this._disabledExtensions,"standardDerivatives",!0,["OES_standard_derivatives"])),this._standardDerivatives}get shaderTextureLOD(){return null===this._shaderTextureLOD&&(this._shaderTextureLOD=o(this._gl,this._disabledExtensions,"shaderTextureLOD",!0,["EXT_shader_texture_lod"])),this._shaderTextureLOD}get fragDepth(){return null===this._fragDepth&&(this._fragDepth=o(this._gl,this._disabledExtensions,"fragDepth",!0,["EXT_frag_depth"])),this._fragDepth}get loseContext(){return this._loseContext||(this._loseContext=u(this._gl,this._debugWebGLExtensions)),this._loseContext}get textureNorm16(){return this._textureNorm16||(this._textureNorm16=a(this._gl,this._disabledExtensions)),this._textureNorm16}get textureFloatLinear(){return null===this._textureFloatLinear&&(this._textureFloatLinear=o(this._gl,this._disabledExtensions,"textureFloatLinear",!1,["OES_texture_float_linear"])),this._textureFloatLinear}enable(t){return this[t]}}export{x as Capabilities};