Enabled and stores webgl capabilities
Extensions Capabilities


new Capabilities()

Name Type Description
CompressedTextureS3TC boolean

S3TC (DXT) compression, WEBGL_compressed_texture_s3tc

TextureFloat boolean

Floating point textures, OES_texture_float

TextureFloatLinear boolean

Linear filtering of floating point textures, OES_texture_float_linear

TextureHalfFloat boolean

16-bit floating point textures, OES_texture_half_float

TextureHalfFloatLinear boolean

Linear filtering of 16-bit floating point

StandardDerivatives boolean

Enabled dFdx/dFdy/fwidth in fragment shaders, OES_standard_derivatives

TextureFilterAnisotropic boolean

Anisotropic filtering of textures, EXT_texture_filter_anisotropic

DepthTexture boolean

Depth textures, WEBGL_depth_texture

ElementIndexUInt boolean

32-bit index buffers, OES_element_index_uint

InstancedArrays boolean

Instanced arrays, ANGLE_instanced_arrays

BlendMinmax boolean

BlendMinmax, EXT_blend_minmax

FragDepth boolean

FragDepth, EXT_frag_depth

ShaderTextureLod boolean

ShaderTextureLod, EXT_shader_texture_lod

VertexArrayObject boolean

VertexArrayObject, OES_vertex_array_object

DrawBuffers boolean

Multiple rendertargets, WEBGL_draw_buffers

maxTexureSize number

Maximum 2D texture size

maxCubemapSize number

Maximum cubemap size

maxRenderbufferSize number

Maximum renderbuffer size

maxViewPortDims Array.<number>

Maximum viewport size [x, y]

maxVertexTextureUnits number

Maximum vertex shader texture units

maxFragmentTextureUnits number

Maximum fragment shader texture units

maxCombinedTextureUnits number

Maximum total texture units

maxVertexAttributes number

Maximum vertex attributes

maxVertexUniformVectors number

Maximum vertex uniform vectors

maxFragmentUniformVectors number

Maximum fragment uniform vectors

maxVaryingVectors number

Maximum varying vectors

aliasedPointSizeRange number

Point size min/max [min, max]

aliasedLineWidthRange number

Line width min/max [min, max]

samples number

Antialiasing sample size

sampleBuffers number

Sample buffer count

depthBits number

Depth bits

stencilBits number

Stencil bits

subpixelBits number

Sub-pixel bits

supportedExtensionsList number

Supported extension as an array

renderer number

Renderer name

vendor number

Vendor name

version number

Version string

shadingLanguageVersion number

Shadinglanguage version string


(static) getCapabilitiesString() → {string}

Gets a string representation of the current capabilities

(static) init(context, contextName)

Initialize capabilities from rendering context.

Name Type Description
context WebGLRenderingContext | WebGL2RenderingContext

WebGLRenderingContext OR WebGL2RenderingContext

contextName String

string describing what kind of context (Webgl2 or other)