@galacean/engine-rhi-webgl 1.6.8 → 1.6.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,53 @@
1
+ import { GLCapabilityType } from "@galacean/engine-core";
2
+ import { WebGLGraphicDevice } from "./WebGLGraphicDevice";
3
+ import { GLCompressedTextureInternalFormat } from "./type";
4
+ /**
5
+ * GL capability.
6
+ */
7
+ export declare class GLCapability {
8
+ private _maxDrawBuffers;
9
+ private _maxAnisoLevel;
10
+ private _maxAntiAliasing;
11
+ _rhi: WebGLGraphicDevice;
12
+ capabilityList: Map<GLCapabilityType, boolean>;
13
+ get maxTextureSize(): boolean;
14
+ get canUseFloatTextureBlendShape(): boolean;
15
+ /**
16
+ * Whether can use more joints.
17
+ */
18
+ get canIUseMoreJoints(): boolean;
19
+ get maxDrawBuffers(): number;
20
+ /**
21
+ * Max anisoLevel.
22
+ */
23
+ get maxAnisoLevel(): number;
24
+ /**
25
+ * Max MSAA count.
26
+ */
27
+ get maxAntiAliasing(): number;
28
+ get isFragmentHighPrecision(): boolean;
29
+ get rhi(): WebGLGraphicDevice;
30
+ constructor(rhi: WebGLGraphicDevice);
31
+ /**
32
+ * Check device capabilities.
33
+ */
34
+ canIUse(capabilityType: GLCapabilityType): boolean;
35
+ /**
36
+ * Check if can use some compressed texture format.
37
+ */
38
+ canIUseCompressedTextureInternalFormat(internalType: GLCompressedTextureInternalFormat): boolean;
39
+ /**
40
+ * Init capabilities.
41
+ */
42
+ private _init;
43
+ /**
44
+ * If there are extensions that can supplement this ability, smooth out the difference.
45
+ * @example
46
+ * compatible(GLCapabilityType.depthTexture,{
47
+ * UNSIGNED_INT_24_8: "UNSIGNED_INT_24_8_WEBGL"
48
+ * })
49
+ * gl.UNSIGNED_INT_24_8 = ext.UNSIGNED_INT_24_8_WEBGL
50
+ */
51
+ private _compatibleInterface;
52
+ private _compatibleAllInterface;
53
+ }
@@ -0,0 +1,14 @@
1
+ import { WebGLGraphicDevice } from "./WebGLGraphicDevice";
2
+ import { GLCapabilityType } from "@galacean/engine-core";
3
+ /**
4
+ * GLContext extension.
5
+ */
6
+ export declare class GLExtensions {
7
+ private rhi;
8
+ private _requireResult;
9
+ constructor(rhi: WebGLGraphicDevice);
10
+ /**
11
+ * Require an extension.
12
+ */
13
+ requireExtension(ext: GLCapabilityType): any;
14
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,15 @@
1
+ /**
2
+ * @private
3
+ */
4
+ export declare class GLRenderStates {
5
+ private _gl;
6
+ private _parameters;
7
+ /**
8
+ * @param {WebGLRenderingContext} gl
9
+ */
10
+ constructor(gl: WebGLRenderingContext);
11
+ /**
12
+ * Get a parameter.
13
+ */
14
+ getParameter(pname: any): any;
15
+ }
@@ -0,0 +1,40 @@
1
+ import { IPlatformRenderTarget, RenderTarget, TextureCubeFace } from "@galacean/engine-core";
2
+ import { WebGLGraphicDevice } from "./WebGLGraphicDevice";
3
+ /**
4
+ * The render target in WebGL platform is used for off-screen rendering.
5
+ */
6
+ export declare class GLRenderTarget implements IPlatformRenderTarget {
7
+ private _gl;
8
+ private _isWebGL2;
9
+ private _target;
10
+ private _frameBuffer;
11
+ private _MSAAFrameBuffer;
12
+ private _depthRenderBuffer;
13
+ private _MSAAColorRenderBuffers;
14
+ private _MSAADepthRenderBuffer;
15
+ private _oriDrawBuffers;
16
+ private _blitDrawBuffers;
17
+ private _curMipLevel;
18
+ private _curFaceIndex;
19
+ /**
20
+ * Create render target in WebGL platform.
21
+ */
22
+ constructor(rhi: WebGLGraphicDevice, target: RenderTarget);
23
+ /**
24
+ * Set which face and mipLevel of the cube texture to render to.
25
+ * @param mipLevel - Set mip level the data want to write
26
+ * @param faceIndex - Cube texture face
27
+ */
28
+ activeRenderTarget(mipLevel: number, faceIndex?: TextureCubeFace): void;
29
+ /**
30
+ * Blit FBO.
31
+ */
32
+ blitRenderTarget(): void;
33
+ /**
34
+ * Destroy render target.
35
+ */
36
+ destroy(): void;
37
+ private _bindMainFBO;
38
+ private _bindMSAAFBO;
39
+ private _checkFrameBuffer;
40
+ }
@@ -0,0 +1,55 @@
1
+ import { IPlatformTexture, Texture, TextureCubeFace, TextureDepthCompareFunction, TextureFilterMode, TextureWrapMode } from "@galacean/engine-core";
2
+ import { WebGLGraphicDevice } from "./WebGLGraphicDevice";
3
+ /**
4
+ * Texture in WebGL platform.
5
+ */
6
+ export declare class GLTexture implements IPlatformTexture {
7
+ /**
8
+ * Wrapping mode for texture coordinate S.
9
+ */
10
+ set wrapModeU(value: TextureWrapMode);
11
+ /**
12
+ * Wrapping mode for texture coordinate T.
13
+ */
14
+ set wrapModeV(value: TextureWrapMode);
15
+ /**
16
+ * Filter mode for texture.
17
+ */
18
+ set filterMode(value: TextureFilterMode);
19
+ /**
20
+ * Anisotropic level for texture.
21
+ */
22
+ set anisoLevel(value: number);
23
+ set depthCompareFunction(value: TextureDepthCompareFunction);
24
+ /**
25
+ * Create texture in WebGL platform.
26
+ */
27
+ constructor(rhi: WebGLGraphicDevice, texture: Texture, target: GLenum);
28
+ /**
29
+ * Destroy texture.
30
+ */
31
+ destroy(): void;
32
+ /**
33
+ * Generate multi-level textures based on the 0th level data.
34
+ */
35
+ generateMipmaps(): void;
36
+ protected _bind(): void;
37
+ /**
38
+ * Pre-development mipmapping GPU memory.
39
+ */
40
+ protected _init(isCube: boolean): void;
41
+ /**
42
+ * Get the pixel color buffer according to the specified cube face and area.
43
+ * @param face - You can choose which cube face to read
44
+ * @param x - X coordinate of area start
45
+ * @param y - Y coordinate of area start
46
+ * @param width - Area width
47
+ * @param height - Area height
48
+ * @param out - Color buffer
49
+ * @param mipLevel - Set mip level the data want to get from
50
+ */
51
+ protected _getPixelBuffer(face: TextureCubeFace | null, x: number, y: number, width: number, height: number, mipLevel: number, out: ArrayBufferView): void;
52
+ protected _getReadFrameBuffer(): WebGLFramebuffer;
53
+ protected _validate(texture: Texture, rhi: WebGLGraphicDevice): void;
54
+ private _setWrapMode;
55
+ }
@@ -0,0 +1,23 @@
1
+ import { IPlatformTexture2D, Texture2D } from "@galacean/engine-core";
2
+ import { GLTexture } from "./GLTexture";
3
+ import { WebGLGraphicDevice } from "./WebGLGraphicDevice";
4
+ /**
5
+ * Texture 2d in WebGL platform.
6
+ */
7
+ export declare class GLTexture2D extends GLTexture implements IPlatformTexture2D {
8
+ /** Backward compatible with WebGL1.0. */
9
+ private _compressedMipFilled;
10
+ constructor(rhi: WebGLGraphicDevice, texture2D: Texture2D);
11
+ /**
12
+ * {@inheritDoc IPlatformTexture2D.setPixelBuffer}
13
+ */
14
+ setPixelBuffer(colorBuffer: ArrayBufferView, mipLevel: number, x: number, y: number, width?: number, height?: number): void;
15
+ /**
16
+ * {@inheritDoc IPlatformTexture2D.setImageSource}
17
+ */
18
+ setImageSource(imageSource: TexImageSource, mipLevel: number, flipY: boolean, premultiplyAlpha: boolean, x: number, y: number): void;
19
+ /**
20
+ * {@inheritDoc IPlatformTexture2D.getPixelBuffer }
21
+ */
22
+ getPixelBuffer(x: number, y: number, width: number, height: number, mipLevel: number, out: ArrayBufferView): void;
23
+ }
@@ -0,0 +1,22 @@
1
+ import { IPlatformTexture2DArray, Texture2DArray } from "@galacean/engine-core";
2
+ import { GLTexture } from "./GLTexture";
3
+ import { WebGLGraphicDevice } from "./WebGLGraphicDevice";
4
+ /**
5
+ * Texture 2D array in WebGL platform.
6
+ */
7
+ export declare class GLTexture2DArray extends GLTexture implements IPlatformTexture2DArray {
8
+ constructor(rhi: WebGLGraphicDevice, texture2DArray: Texture2DArray);
9
+ /**
10
+ * {@inheritDoc IPlatformTexture2DArray.setPixelBuffer}
11
+ */
12
+ setPixelBuffer(offsetIndex: number, colorBuffer: ArrayBufferView, mipLevel: number, x: number, y: number, width?: number, height?: number, length?: number): void;
13
+ /**
14
+ * {@inheritDoc IPlatformTexture2DArray.setImageSource}
15
+ */
16
+ setImageSource(elementIndex: number, imageSource: TexImageSource, mipLevel: number, flipY: boolean, premultiplyAlpha: boolean, x: number, y: number): void;
17
+ /**
18
+ * {@inheritDoc IPlatformTexture2DArray.getPixelBuffer}
19
+ */
20
+ getPixelBuffer(elementIndex: number, x: number, y: number, width: number, height: number, mipLevel: number, out: ArrayBufferView): void;
21
+ protected _validate(texture: Texture2DArray, rhi: WebGLGraphicDevice): void;
22
+ }
@@ -0,0 +1,23 @@
1
+ import { IPlatformTextureCube, TextureCube, TextureCubeFace } from "@galacean/engine-core";
2
+ import { GLTexture } from "./GLTexture";
3
+ import { WebGLGraphicDevice } from "./WebGLGraphicDevice";
4
+ /**
5
+ * Cube texture in WebGL platform.
6
+ */
7
+ export declare class GLTextureCube extends GLTexture implements IPlatformTextureCube {
8
+ /** Backward compatible with WebGL1.0. */
9
+ private _compressedFaceFilled;
10
+ constructor(rhi: WebGLGraphicDevice, textureCube: TextureCube);
11
+ /**
12
+ * {@inheritDoc IPlatformTextureCube.setPixelBuffer}
13
+ */
14
+ setPixelBuffer(face: TextureCubeFace, colorBuffer: ArrayBufferView, mipLevel: number, x: number, y: number, width?: number, height?: number): void;
15
+ /**
16
+ * {@inheritDoc IPlatformTextureCube.setImageSource}
17
+ */
18
+ setImageSource(face: TextureCubeFace, imageSource: TexImageSource, mipLevel: number, flipY: boolean, premultiplyAlpha: boolean, x: number, y: number): void;
19
+ /**
20
+ * {@inheritDoc IPlatformTextureCube.getPixelBuffer}
21
+ */
22
+ getPixelBuffer(face: TextureCubeFace, x: number, y: number, width: number, height: number, mipLevel: number, out: ArrayBufferView): void;
23
+ }
@@ -0,0 +1,35 @@
1
+ import { Canvas } from "@galacean/engine-core";
2
+ import { Vector2 } from "@galacean/engine-math";
3
+ type OffscreenCanvas = any;
4
+ /**
5
+ * The canvas used on the web, which can support HTMLCanvasElement and OffscreenCanvas.
6
+ */
7
+ export declare class WebCanvas extends Canvas {
8
+ _webCanvas: HTMLCanvasElement | OffscreenCanvas;
9
+ private _scale;
10
+ /**
11
+ * The scale of canvas, the value is visible width/height divide the render width/height.
12
+ * @remarks Need to re-assign after modification to ensure that the modification takes effect.
13
+ */
14
+ get scale(): Vector2;
15
+ set scale(value: Vector2);
16
+ /**
17
+ * Resize the rendering size according to the clientWidth and clientHeight of the canvas.
18
+ * @param pixelRatio - Pixel ratio
19
+ */
20
+ resizeByClientSize(pixelRatio?: number): void;
21
+ /**
22
+ * Create a web canvas.
23
+ * @param webCanvas - Web native canvas
24
+ */
25
+ constructor(webCanvas: HTMLCanvasElement | OffscreenCanvas);
26
+ /**
27
+ * Set scale.
28
+ * @param x - Scale along the X axis
29
+ * @param y - Scale along the Y axis
30
+ */
31
+ setScale(x: number, y: number): void;
32
+ protected _onWidthChanged(value: number): void;
33
+ protected _onHeightChange(value: number): void;
34
+ }
35
+ export {};
@@ -0,0 +1,27 @@
1
+ import { Engine, EngineConfiguration } from "@galacean/engine-core";
2
+ import { WebGLGraphicDeviceOptions } from "./";
3
+ import { WebCanvas } from "./WebCanvas";
4
+ /**
5
+ * WebGL platform engine,support includes WebGL1.0 and WebGL2.0.
6
+ */
7
+ export declare class WebGLEngine extends Engine {
8
+ /**
9
+ * Create a WebGL engine.
10
+ * @param configuration - WebGL engine configuration
11
+ * @returns A promise that will resolve when the engine is created
12
+ */
13
+ static create(configuration: WebGLEngineConfiguration): Promise<WebGLEngine>;
14
+ /**
15
+ * Web canvas.
16
+ */
17
+ get canvas(): WebCanvas;
18
+ }
19
+ /**
20
+ * WebGL engine configuration.
21
+ */
22
+ export interface WebGLEngineConfiguration extends EngineConfiguration {
23
+ /** Canvas element or canvas id. */
24
+ canvas: HTMLCanvasElement | OffscreenCanvas | string;
25
+ /** Graphic device options. */
26
+ graphicDeviceOptions?: WebGLGraphicDeviceOptions;
27
+ }
@@ -0,0 +1,106 @@
1
+ import { BufferBindFlag, BufferUsage, CameraClearFlags, Canvas, Engine, GLCapabilityType, IPlatformBuffer, IPlatformRenderTarget, IPlatformTexture2D, IPlatformTextureCube, Mesh, RenderTarget, SubMesh, Texture2D, Texture2DArray, TextureCube, TextureCubeFace } from "@galacean/engine-core";
2
+ import { IHardwareRenderer, IPlatformPrimitive, IPlatformShaderProgram } from "@galacean/engine-design";
3
+ import { Color, Vector4 } from "@galacean/engine-math";
4
+ import { GLCapability } from "./GLCapability";
5
+ import { GLPrimitive } from "./GLPrimitive";
6
+ import { GLRenderStates } from "./GLRenderStates";
7
+ import { GLTexture } from "./GLTexture";
8
+ import { GLTexture2DArray } from "./GLTexture2DArray";
9
+ import { WebGLExtension } from "./type";
10
+ /**
11
+ * WebGL mode.
12
+ */
13
+ export declare enum WebGLMode {
14
+ /** Auto, use WebGL2.0 if support, or will fallback to WebGL1.0. */
15
+ Auto = 0,
16
+ /** WebGL2.0. */
17
+ WebGL2 = 1,
18
+ /** WebGL1.0, */
19
+ WebGL1 = 2
20
+ }
21
+ /**
22
+ * WebGL graphic device options.
23
+ */
24
+ export interface WebGLGraphicDeviceOptions {
25
+ /** WebGL mode.*/
26
+ webGLMode?: WebGLMode;
27
+ alpha?: boolean;
28
+ depth?: boolean;
29
+ desynchronized?: boolean;
30
+ failIfMajorPerformanceCaveat?: boolean;
31
+ powerPreference?: WebGLPowerPreference;
32
+ premultipliedAlpha?: boolean;
33
+ preserveDrawingBuffer?: boolean;
34
+ stencil?: boolean;
35
+ xrCompatible?: boolean;
36
+ }
37
+ /**
38
+ * WebGL graphic device, including WebGL1.0 and WebGL2.0.
39
+ */
40
+ export declare class WebGLGraphicDevice implements IHardwareRenderer {
41
+ private _options;
42
+ private _webGLOptions;
43
+ private _gl;
44
+ private _renderStates;
45
+ private _extensions;
46
+ private _capability;
47
+ private _isWebGL2;
48
+ private _renderer;
49
+ private _webCanvas;
50
+ private _activeTextureID;
51
+ private _activeTextures;
52
+ private _lastViewport;
53
+ private _lastScissor;
54
+ private _lastClearColor;
55
+ private _scissorEnable;
56
+ private _onDeviceLost;
57
+ private _onDeviceRestored;
58
+ get isWebGL2(): boolean;
59
+ get renderer(): string;
60
+ /**
61
+ * GL Context
62
+ * @member {WebGLRenderingContext}
63
+ */
64
+ get gl(): (WebGLRenderingContext & WebGLExtension) | WebGL2RenderingContext;
65
+ get renderStates(): GLRenderStates;
66
+ get capability(): GLCapability;
67
+ get canIUseMoreJoints(): boolean;
68
+ constructor(initializeOptions?: WebGLGraphicDeviceOptions);
69
+ init(canvas: Canvas, onDeviceLost: () => void, onDeviceRestored: () => void): void;
70
+ createPlatformPrimitive(primitive: Mesh): IPlatformPrimitive;
71
+ createPlatformTexture2D(texture2D: Texture2D): IPlatformTexture2D;
72
+ createPlatformTexture2DArray(texture2D: Texture2DArray): GLTexture2DArray;
73
+ createPlatformTextureCube(textureCube: TextureCube): IPlatformTextureCube;
74
+ createPlatformRenderTarget(target: RenderTarget): IPlatformRenderTarget;
75
+ createPlatformBuffer(type: BufferBindFlag, byteLength: number, bufferUsage?: BufferUsage, data?: ArrayBuffer | ArrayBufferView): IPlatformBuffer;
76
+ requireExtension(ext: any): any;
77
+ canIUse(capabilityType: GLCapabilityType): boolean;
78
+ canIUseCompressedTextureInternalFormat(type: number): boolean;
79
+ viewport(x: number, y: number, width: number, height: number): void;
80
+ scissor(x: number, y: number, width: number, height: number): void;
81
+ colorMask(r: boolean, g: boolean, b: boolean, a: boolean): void;
82
+ clearRenderTarget(engine: Engine, clearFlags: CameraClearFlags, clearColor?: Color): void;
83
+ drawPrimitive(primitive: GLPrimitive, subPrimitive: SubMesh, shaderProgram: IPlatformShaderProgram): void;
84
+ getMainFrameBufferWidth(): number;
85
+ getMainFrameBufferHeight(): number;
86
+ activeRenderTarget(renderTarget: RenderTarget, viewport: Vector4, isFlipProjection: boolean, mipLevel?: number, faceIndex?: TextureCubeFace): void;
87
+ blitInternalRTByBlitFrameBuffer(srcRT: RenderTarget, destRT: RenderTarget, clearFlags: CameraClearFlags, viewport: Vector4): void;
88
+ copyRenderTargetToSubTexture(srcRT: RenderTarget, grabTexture: Texture2D, viewport: Vector4): void;
89
+ activeTexture(textureID: number): void;
90
+ bindTexture(texture: GLTexture): void;
91
+ setGlobalDepthBias(bias: number, slopeBias: number): void;
92
+ flush(): void;
93
+ forceLoseDevice(): void;
94
+ forceRestoreDevice(): void;
95
+ /**
96
+ * @remarks
97
+ * WebGL context loss and restore can happen at any GPU execution point. refs to: https://www.khronos.org/webgl/wiki/HandlingContextLost
98
+ */
99
+ isContextLost(): boolean;
100
+ resetState(): void;
101
+ protected _initGLState(gl: (WebGLRenderingContext & WebGLExtension) | WebGL2RenderingContext): void;
102
+ destroy(): void;
103
+ private _onContextCreationError;
104
+ private _onWebGLContextLost;
105
+ private _onWebGLContextRestored;
106
+ }
@@ -0,0 +1,6 @@
1
+ export { GLCompressedTextureInternalFormat } from "./type";
2
+ export { WebCanvas } from "./WebCanvas";
3
+ export { WebGLEngine } from "./WebGLEngine";
4
+ export type { WebGLEngineConfiguration } from "./WebGLEngine";
5
+ export { WebGLMode, WebGLGraphicDevice } from "./WebGLGraphicDevice";
6
+ export type { WebGLGraphicDeviceOptions } from "./WebGLGraphicDevice";
@@ -0,0 +1,90 @@
1
+ /**
2
+ * Smoothing plug-in.
3
+ * */
4
+ export interface WebGLExtension {
5
+ MAX_DRAW_BUFFERS: GLenum;
6
+ UNSIGNED_INT_24_8: GLenum;
7
+ MAX_SAMPLES: GLenum;
8
+ RGBA8: GLenum;
9
+ RGBA16F: GLenum;
10
+ RGBA32F: GLenum;
11
+ DEPTH_COMPONENT32F: GLenum;
12
+ READ_FRAMEBUFFER: GLenum;
13
+ DRAW_FRAMEBUFFER: GLenum;
14
+ createVertexArray(): WebGLVertexArrayObject | null;
15
+ deleteVertexArray(vertexArray: WebGLVertexArrayObject | null): void;
16
+ isVertexArray(vertexArray: WebGLVertexArrayObject | null): GLboolean;
17
+ bindVertexArray(array: WebGLVertexArrayObject | null): void;
18
+ renderbufferStorageMultisample(target: GLenum, samples: GLsizei, internalformat: GLenum, width: GLsizei, height: GLsizei): void;
19
+ blitFramebuffer(srcX0: GLint, srcY0: GLint, srcX1: GLint, srcY1: GLint, dstX0: GLint, dstY0: GLint, dstX1: GLint, dstY1: GLint, mask: GLbitfield, filter: GLenum): void;
20
+ drawArraysInstanced(mode: GLenum, first: GLint, count: GLsizei, instanceCount: GLsizei): void;
21
+ drawElementsInstanced(mode: GLenum, count: GLsizei, type: GLenum, offset: GLintptr, instanceCount: GLsizei): void;
22
+ vertexAttribDivisor(index: GLuint, divisor: GLuint): void;
23
+ drawBuffers(buffers: Iterable<GLenum>): void;
24
+ }
25
+ export interface TextureFormatDetail {
26
+ internalFormat: GLint;
27
+ baseFormat?: GLenum;
28
+ dataType?: GLenum;
29
+ isCompressed: boolean;
30
+ attachment?: GLenum;
31
+ readFormat?: GLenum;
32
+ alignment?: number;
33
+ }
34
+ export declare enum GLCompressedTextureInternalFormat {
35
+ RGBA_ASTC_4X4_KHR = 37808,
36
+ RGBA_ASTC_5X4_KHR = 37809,
37
+ RGBA_ASTC_5X5_KHR = 37810,
38
+ RGBA_ASTC_6X5_KHR = 37811,
39
+ RGBA_ASTC_6X6_KHR = 37812,
40
+ RGBA_ASTC_8X5_KHR = 37813,
41
+ RGBA_ASTC_8X6_KHR = 37814,
42
+ RGBA_ASTC_8X8_KHR = 37815,
43
+ RGBA_ASTC_10X5_KHR = 37816,
44
+ RGBA_ASTC_10X6_KHR = 37817,
45
+ RGBA_ASTC_10X8_KHR = 37818,
46
+ RGBA_ASTC_10X10_KHR = 37819,
47
+ RGBA_ASTC_12X10_KHR = 37820,
48
+ RGBA_ASTC_12X12_KHR = 37821,
49
+ SRGB8_ALPHA8_ASTC_4X4_KHR = 37840,
50
+ SRGB8_ALPHA8_ASTC_5X4_KHR = 37841,
51
+ SRGB8_ALPHA8_ASTC_5X5_KHR = 37842,
52
+ SRGB8_ALPHA8_ASTC_6X5_KHR = 37843,
53
+ SRGB8_ALPHA8_ASTC_6X6_KHR = 37844,
54
+ SRGB8_ALPHA8_ASTC_8X5_KHR = 37845,
55
+ SRGB8_ALPHA8_ASTC_8X6_KHR = 37846,
56
+ SRGB8_ALPHA8_ASTC_8X8_KHR = 37847,
57
+ SRGB8_ALPHA8_ASTC_10X5_KHR = 37848,
58
+ SRGB8_ALPHA8_ASTC_10X6_KHR = 37849,
59
+ SRGB8_ALPHA8_ASTC_10X8_KHR = 37850,
60
+ SRGB8_ALPHA8_ASTC_10X10_KHR = 37851,
61
+ SRGB8_ALPHA8_ASTC_12X10_KHR = 37852,
62
+ SRGB8_ALPHA8_ASTC_12X12_KHR = 37853,
63
+ RGB_ETC1_WEBGL = 36196,
64
+ R11_EAC = 37488,
65
+ SIGNED_R11_EAC = 37489,
66
+ RG11_EAC = 37490,
67
+ SIGNED_RG11_EAC = 37491,
68
+ RGB8_ETC2 = 37492,
69
+ SRGB8_ETC2 = 37493,
70
+ RGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 37494,
71
+ SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 = 37495,
72
+ RGBA8_ETC2_EAC = 37496,
73
+ SRGB8_ALPHA8_ETC2_EAC = 37497,
74
+ RGB_PVRTC_4BPPV1_IMG = 35840,
75
+ RGB_PVRTC_2BPPV1_IMG = 35841,
76
+ RGBA_PVRTC_4BPPV1_IMG = 35842,
77
+ RGBA_PVRTC_2BPPV1_IMG = 35843,
78
+ RGB_S3TC_DXT1_EXT = 33776,
79
+ RGBA_S3TC_DXT1_EXT = 33777,
80
+ RGBA_S3TC_DXT3_EXT = 33778,
81
+ RGBA_S3TC_DXT5_EXT = 33779,
82
+ SRGB_S3TC_DXT1_EXT = 35916,
83
+ SRGB_ALPHA_S3TC_DXT1_EXT = 35917,
84
+ SRGB_ALPHA_S3TC_DXT3_EXT = 35918,
85
+ SRGB_ALPHA_S3TC_DXT5_EXT = 35919,
86
+ RGBA_BPTC_UNORM_EXT = 36492,
87
+ SRGB_ALPHA_BPTC_UNORM_EXT = 36493,
88
+ RGB_BPTC_SIGNED_FLOAT_EXT = 36494,
89
+ RGB_BPTC_UNSIGNED_FLOAT_EXT = 36495
90
+ }