Documentation
    Preparing search index...

    Variable GLConst

    GL: {
        ALWAYS: 519;
        ARRAY_BUFFER: 34962;
        BLEND: 3042;
        CCW: 2305;
        CLAMP_TO_EDGE: 33071;
        COLOR_ATTACHMENT0: 36064;
        COLOR_BUFFER_BIT: 16384;
        COMPILE_STATUS: 35713;
        CULL_FACE: 2884;
        DECR: 7683;
        DECR_WRAP: 34056;
        DEPTH_ATTACHMENT: 36096;
        DEPTH_BUFFER_BIT: 256;
        DEPTH_COMPONENT: 6402;
        DEPTH_COMPONENT16: 33189;
        DEPTH_COMPONENT24: 33190;
        DEPTH_STENCIL_ATTACHMENT: 33306;
        DEPTH_TEST: 2929;
        DEPTH24_STENCIL8: 35056;
        DST_COLOR: 774;
        ELEMENT_ARRAY_BUFFER: 34963;
        EQUAL: 514;
        FLOAT: 5126;
        FRAGMENT_SHADER: 35632;
        FRAMEBUFFER: 36160;
        FRAMEBUFFER_COMPLETE: 36053;
        GEQUAL: 518;
        GPU_DISJOINT_EXT: 36795;
        GREATER: 516;
        INCR: 7682;
        INCR_WRAP: 34055;
        INVERT: 5386;
        KEEP: 7680;
        LEQUAL: 515;
        LESS: 513;
        LINEAR: 9729;
        LINEAR_MIPMAP_LINEAR: 9987;
        LINEAR_MIPMAP_NEAREST: 9985;
        LINES: 1;
        LINK_STATUS: 35714;
        MAX_TEXTURE_MAX_ANISOTROPY_EXT: 34047;
        MAX_TEXTURE_SIZE: 3379;
        MIRRORED_REPEAT: 33648;
        NEAREST: 9728;
        NEAREST_MIPMAP_LINEAR: 9986;
        NEAREST_MIPMAP_NEAREST: 9984;
        NEVER: 512;
        NOTEQUAL: 517;
        ONE: 1;
        ONE_MINUS_SRC_ALPHA: 771;
        ONE_MINUS_SRC_COLOR: 769;
        QUERY_RESULT: 34918;
        QUERY_RESULT_AVAILABLE: 34919;
        RENDERBUFFER: 36161;
        REPEAT: 10497;
        REPLACE: 7681;
        RGBA: 6408;
        RGBA8: 32856;
        SCISSOR_TEST: 3089;
        SRC_ALPHA: 770;
        SRC_COLOR: 768;
        SRGB8_ALPHA8: 35907;
        STATIC_DRAW: 35044;
        STENCIL_BUFFER_BIT: 1024;
        STENCIL_TEST: 2960;
        TEXTURE_2D: 3553;
        TEXTURE_MAG_FILTER: 10240;
        TEXTURE_MAX_ANISOTROPY_EXT: 34046;
        TEXTURE_MIN_FILTER: 10241;
        TEXTURE_WRAP_S: 10242;
        TEXTURE_WRAP_T: 10243;
        TEXTURE0: 33984;
        TIME_ELAPSED_EXT: 35007;
        TRIANGLES: 4;
        UNSIGNED_BYTE: 5121;
        UNSIGNED_INT: 5125;
        UNSIGNED_SHORT: 5123;
        VERTEX_SHADER: 35633;
        ZERO: 0;
    }

    The WebGL 2 / OpenGL ES 3.0 enumerants this package uses, by their normative values. See the module header for why these are literals.

    Type Declaration

    • ReadonlyALWAYS: 519

      GL_ALWAYS — the stencil test's initial state, and what a mask pass uses.

    • ReadonlyARRAY_BUFFER: 34962

      GL_ARRAY_BUFFER — vertex attribute storage.

    • ReadonlyBLEND: 3042

      GL_BLEND — enabled around sprite and particle passes; see webgl-renderer.ts.

    • ReadonlyCCW: 2305

      GL_CCW — counter-clockwise front faces (§7a right-handed, Y-up).

    • ReadonlyCLAMP_TO_EDGE: 33071

      GL_CLAMP_TO_EDGE — the default wrap mode of a §77 texture (R-30).

    • ReadonlyCOLOR_ATTACHMENT0: 36064

      GL_COLOR_ATTACHMENT0 — a render target's colour texture (R-4).

    • ReadonlyCOLOR_BUFFER_BIT: 16384

      GL_COLOR_BUFFER_BIT, for WebglContext.clear.

    • ReadonlyCOMPILE_STATUS: 35713

      GL_COMPILE_STATUS.

    • ReadonlyCULL_FACE: 2884

      GL_CULL_FACE, deliberately left disabled — see webgl-renderer.ts.

    • ReadonlyDECR: 7683

      GL_DECR — decrement, saturating at 0.

    • ReadonlyDECR_WRAP: 34056

      GL_DECR_WRAP — decrement, wrapping 0 to 255.

    • ReadonlyDEPTH_ATTACHMENT: 36096

      GL_DEPTH_ATTACHMENT — a render target's depth renderbuffer (R-4).

    • ReadonlyDEPTH_BUFFER_BIT: 256

      GL_DEPTH_BUFFER_BIT, for WebglContext.clear.

    • ReadonlyDEPTH_COMPONENT: 6402

      GL_DEPTH_COMPONENT — the texel format of a depth texture (R-18).

    • ReadonlyDEPTH_COMPONENT16: 33189

      GL_DEPTH_COMPONENT16 — storage format of a render target's depth renderbuffer (R-4). The narrowest depth format WebGL 2 guarantees is renderbuffer-renderable everywhere; 24-bit depth and packed depth-stencil are staged with §67 and §69 (see gl-render-target.ts).

    • ReadonlyDEPTH_COMPONENT24: 33190

      GL_DEPTH_COMPONENT24 — sized internal format of a samplable depth attachment (R-18, §69). Twenty-four bits rather than the renderbuffer's sixteen because a shadow map's whole content is a depth comparison, and 16-bit quantization over a 100 m volume shows as banded self-shadowing before any bias can help; WebGL 2 requires this format for textures.

    • ReadonlyDEPTH_STENCIL_ATTACHMENT: 33306

      GL_DEPTH_STENCIL_ATTACHMENT — where GL.DEPTH24_STENCIL8 attaches.

    • ReadonlyDEPTH_TEST: 2929

      GL_DEPTH_TEST.

    • ReadonlyDEPTH24_STENCIL8: 35056

      GL_DEPTH24_STENCIL8 — the packed depth-plus-stencil renderbuffer storage a render target asks for with stencil: true (R-7, §67).

      Packed rather than a separate STENCIL_INDEX8 renderbuffer: WebGL 2 guarantees this combination is framebuffer-complete, a separate stencil attachment beside a separate depth attachment is not guaranteed to be, and one renderbuffer is one allocation. The consequence is stated where it matters (gl-render-target.ts): the packed form is a renderbuffer, so a target cannot ask for a stencil and R-18's samplable depthTexture at once.

    • ReadonlyDST_COLOR: 774

      GL_DST_COLOR — source factor of the "multiply" blend mode.

    • ReadonlyELEMENT_ARRAY_BUFFER: 34963

      GL_ELEMENT_ARRAY_BUFFER — index storage; part of vertex-array state.

    • ReadonlyEQUAL: 514

      GL_EQUAL — the mask test: draw only where the mask was written.

    • ReadonlyFLOAT: 5126

      GL_FLOAT — the position attribute's component type.

    • ReadonlyFRAGMENT_SHADER: 35632

      GL_FRAGMENT_SHADER.

    • ReadonlyFRAMEBUFFER: 36160

      GL_FRAMEBUFFER — the bind point for both drawing and attaching (R-4).

    • ReadonlyFRAMEBUFFER_COMPLETE: 36053

      GL_FRAMEBUFFER_COMPLETE — the one status a usable framebuffer reports.

    • ReadonlyGEQUAL: 518

      GL_GEQUAL.

    • ReadonlyGPU_DISJOINT_EXT: 36795

      GL_GPU_DISJOINT_EXT — true when the GPU reset its timers this interval. A completed elapsed-time query whose disjoint flag is set is discarded rather than published as gpuFrameTime.

    • ReadonlyGREATER: 516

      GL_GREATER.

    • ReadonlyINCR: 7682

      GL_INCR — increment, saturating at 255.

    • ReadonlyINCR_WRAP: 34055

      GL_INCR_WRAP — increment, wrapping 255 to 0.

    • ReadonlyINVERT: 5386

      GL_INVERT — bitwise-invert the stored value.

    • ReadonlyKEEP: 7680

      GL_KEEP — leave the stored value alone; the initial state of all three ops.

    • ReadonlyLEQUAL: 515

      GL_LEQUAL — the depth comparison this backend uses, and a stencil one.

    • ReadonlyLESS: 513

      GL_LESS.

    • ReadonlyLINEAR: 9729

      GL_LINEAR — bilinear sampling, and the default §77 filter (R-30).

    • ReadonlyLINEAR_MIPMAP_LINEAR: 9987

      GL_LINEAR_MIPMAP_LINEAR — trilinear (§77, R-30b, 2026-08-21).

    • ReadonlyLINEAR_MIPMAP_NEAREST: 9985

      GL_LINEAR_MIPMAP_NEAREST — bilinear in level, one level (§77, R-30b).

    • ReadonlyLINES: 1

      GL_LINES — two vertices per primitive.

    • GL_LINK_STATUS.

    • ReadonlyMAX_TEXTURE_MAX_ANISOTROPY_EXT: 34047

      GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT — the device's ceiling, read once per cache the first time a texture asks for anisotropy (§62, §77, R-30b).

    • ReadonlyMAX_TEXTURE_SIZE: 3379

      GL_MAX_TEXTURE_SIZE, the one §62 limit the MVP reports.

    • ReadonlyMIRRORED_REPEAT: 33648

      GL_MIRRORED_REPEAT — §77's mirrored tiling wrap mode (R-30).

    • ReadonlyNEAREST: 9728

      GL_NEAREST — point sampling. The one place this tier uses it is §69's shadow map (R-18): a DEPTH_COMPONENT texture is not filterable in GLES 3.0, so LINEAR would leave it incomplete and sample as black. The percentage-closer filter is therefore explicit taps in the shader rather than hardware filtering — see gl-shadow.ts.

    • ReadonlyNEAREST_MIPMAP_LINEAR: 9986

      GL_NEAREST_MIPMAP_LINEAR — point in level, two levels (§77, R-30b).

    • ReadonlyNEAREST_MIPMAP_NEAREST: 9984

      GL_NEAREST_MIPMAP_NEAREST — point in level, one level (§77, R-30b).

    • ReadonlyNEVER: 512

      GL_NEVER — a stencil test that never passes.

    • ReadonlyNOTEQUAL: 517

      GL_NOTEQUAL — the inverse mask test.

    • ReadonlyONE: 1

      GL_ONE — destination factor of "additive", source of "screen".

    • ReadonlyONE_MINUS_SRC_ALPHA: 771

      GL_ONE_MINUS_SRC_ALPHA — destination factor of the same blend.

    • ReadonlyONE_MINUS_SRC_COLOR: 769

      GL_ONE_MINUS_SRC_COLOR — destination factor of "screen".

    • ReadonlyQUERY_RESULT: 34918

      GL_QUERY_RESULT — the completed query's value (nanoseconds here).

    • ReadonlyQUERY_RESULT_AVAILABLE: 34919

      GL_QUERY_RESULT_AVAILABLE — whether GL.QUERY_RESULT may be read.

    • ReadonlyRENDERBUFFER: 36161

      GL_RENDERBUFFER — the bind point for depth storage (R-4).

    • ReadonlyREPEAT: 10497

      GL_REPEAT — §77's tiling wrap mode (R-30, 2026-08-13).

    • ReadonlyREPLACE: 7681

      GL_REPLACE — store the reference value.

    • ReadonlyRGBA: 6408

      GL_RGBA — the texel upload format.

    • ReadonlyRGBA8: 32856

      GL_RGBA8 — the sized internal format of an MVP-tier texture.

    • ReadonlySCISSOR_TEST: 3089

      GL_SCISSOR_TEST — enabled for the lifetime of the renderer.

    • ReadonlySRC_ALPHA: 770

      GL_SRC_ALPHA — source factor of the straight-alpha blend (§66).

    • ReadonlySRC_COLOR: 768

      GL_SRC_COLOR; declared for completeness of the blend-factor set.

    • ReadonlySRGB8_ALPHA8: 35907

      GL_SRGB8_ALPHA8 — the sized internal format of a texture whose texels are sRGB-encoded (§60a, R-15).

      Chosen instead of a decode in the shader because the hardware does it on sample, i.e. before filtering: bilinear interpolation between two sRGB-encoded texels is wrong in exactly the way a colour space exists to prevent, and a shader-side pow would interpolate first and decode after. The alpha channel of this format is not encoded, which matches srgbToLinearRGBA's rule that alpha is coverage, not light.

    • ReadonlySTATIC_DRAW: 35044

      GL_STATIC_DRAW — the only usage hint this tier uploads with.

    • ReadonlySTENCIL_BUFFER_BIT: 1024

      GL_STENCIL_BUFFER_BIT, for WebglContext.clear (§67, R-7).

    • ReadonlySTENCIL_TEST: 2960

      GL_STENCIL_TEST — disabled until a material declares stencil (§57).

    • ReadonlyTEXTURE_2D: 3553

      GL_TEXTURE_2D — the one texture target this tier binds (§77).

    • ReadonlyTEXTURE_MAG_FILTER: 10240

      GL_TEXTURE_MAG_FILTER.

    • ReadonlyTEXTURE_MAX_ANISOTROPY_EXT: 34046

      GL_TEXTURE_MAX_ANISOTROPY_EXT — the per-texture anisotropy limit of EXT_texture_filter_anisotropic (§77, R-30b).

      Written with texParameteri rather than texParameterf: the extension accepts both, Texture.anisotropy is an integer by construction (§85), and an integer keeps this package's GL budget at the entry points it already declares (see WebglContext).

    • ReadonlyTEXTURE_MIN_FILTER: 10241

      GL_TEXTURE_MIN_FILTER.

    • ReadonlyTEXTURE_WRAP_S: 10242

      GL_TEXTURE_WRAP_S.

    • ReadonlyTEXTURE_WRAP_T: 10243

      GL_TEXTURE_WRAP_T.

    • ReadonlyTEXTURE0: 33984

      GL_TEXTURE0 — the one texture unit the sprite pipeline samples from.

    • ReadonlyTIME_ELAPSED_EXT: 35007

      GL_TIME_ELAPSED_EXT — EXT_disjoint_timer_query_webgl2's elapsed-time query target (§62 timestamp queries, A-1). Nanoseconds between beginQuery and endQuery.

    • ReadonlyTRIANGLES: 4

      GL_TRIANGLES — three vertices per primitive.

    • ReadonlyUNSIGNED_BYTE: 5121

      GL_UNSIGNED_BYTE — the RGBA8 texel component type.

    • ReadonlyUNSIGNED_INT: 5125

      GL_UNSIGNED_INT — index type of a Uint32Array index buffer.

    • ReadonlyUNSIGNED_SHORT: 5123

      GL_UNSIGNED_SHORT — index type of a Uint16Array index buffer.

    • ReadonlyVERTEX_SHADER: 35633

      GL_VERTEX_SHADER.

    • ReadonlyZERO: 0

      GL_ZERO — destination factor of the "multiply" blend mode (§57).