@itwin/webgl-compatibility 4.0.0-dev.8 → 4.0.0-dev.81

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.
@@ -1,119 +1,119 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- /** @packageDocumentation
7
- * @module Compatibility
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.queryRenderCompatibility = exports.WebGLRenderCompatibilityStatus = exports.WebGLFeature = void 0;
11
- const Capabilities_1 = require("./Capabilities");
12
- /** Enumerates the required and optional WebGL features used by the [RenderSystem]($frontend).
13
- * @public
14
- */
15
- var WebGLFeature;
16
- (function (WebGLFeature) {
17
- /** This feature allows transparent geometry to be rendered more efficiently, using 1 pass instead of 2. */
18
- WebGLFeature["MrtTransparency"] = "mrt transparency";
19
- /** This feature allows picking to occur more efficiently, using 1 pass instead of 3. */
20
- WebGLFeature["MrtPick"] = "mrt pick";
21
- /** This feature ensures large meshes (with more than 21,845 triangles) can be rendered. */
22
- WebGLFeature["UintElementIndex"] = "uint element index";
23
- /** This feature allows transparency to achieve the optimal quality. Without this feature, overlapping transparent geometry will "wash out" more easily. */
24
- WebGLFeature["FloatRendering"] = "float rendering";
25
- /** This feature allows for the display of non-3D classification data and solar shadows. */
26
- WebGLFeature["DepthTexture"] = "depth texture";
27
- /** This feature allows instancing of repeated geometry, which can reduce memory consumption. */
28
- WebGLFeature["Instancing"] = "instancing";
29
- /** This feature indicates that the system has enough texture units available for the shaders to run properly. */
30
- WebGLFeature["MinimalTextureUnits"] = "minimal texture units";
31
- /** Indicates that shadow maps are supported. Without this feature, shadows cannot be displayed. */
32
- WebGLFeature["ShadowMaps"] = "shadow maps";
33
- /** This feature allows a logarithmic depth buffer to be used. Without this feature, z-fighting will be much more likely to occur. */
34
- WebGLFeature["FragDepth"] = "fragment depth";
35
- /** This feature allows the renderer to achieve accurate contour lines for isoline and stepped delimiter modes of thematic display. */
36
- WebGLFeature["StandardDerivatives"] = "standard derivatives";
37
- /** This feature allows the renderer to smooth curved lines. */
38
- WebGLFeature["AntiAliasing"] = "anti-aliasing";
39
- })(WebGLFeature = exports.WebGLFeature || (exports.WebGLFeature = {}));
40
- /** An enumeration that describes a general "compatibility rating" based on the contents of a [[WebGLRenderCompatibilityInfo]].
41
- * @public
42
- */
43
- var WebGLRenderCompatibilityStatus;
44
- (function (WebGLRenderCompatibilityStatus) {
45
- /**
46
- * Signifies that everything is ideal: context created successfully, all required and optional features are available,
47
- * and browser did not signal a major performance caveat.
48
- */
49
- WebGLRenderCompatibilityStatus[WebGLRenderCompatibilityStatus["AllOkay"] = 0] = "AllOkay";
50
- /**
51
- * Signifies that the base requirements of compatibility are met but at least some optional features are missing.
52
- * Consult the contents of [[WebGLRenderCompatibilityInfo.missingOptionalFeatures]].
53
- */
54
- WebGLRenderCompatibilityStatus[WebGLRenderCompatibilityStatus["MissingOptionalFeatures"] = 1] = "MissingOptionalFeatures";
55
- /**
56
- * Signifies that the base requirements of compatibility are met but WebGL reported a major performance caveat. The browser
57
- * has likely fallen back to software rendering due to lack of a usable GPU.
58
- * Consult [[WebGLRenderCompatibilityInfo.contextErrorMessage]] for a possible description of what went wrong.
59
- * There could also be some missing optional features; consult the contents of [[WebGLRenderCompatibilityInfo.missingOptionalFeatures]].
60
- */
61
- WebGLRenderCompatibilityStatus[WebGLRenderCompatibilityStatus["MajorPerformanceCaveat"] = 2] = "MajorPerformanceCaveat";
62
- /**
63
- * Signifies that the base requirements of compatibility are not met; rendering cannot occur.
64
- * Consult the contents of [[WebGLRenderCompatibilityInfo.missingRequiredFeatures]].
65
- */
66
- WebGLRenderCompatibilityStatus[WebGLRenderCompatibilityStatus["MissingRequiredFeatures"] = 3] = "MissingRequiredFeatures";
67
- /**
68
- * Signifies an inability to create either a canvas or a WebGL rendering context; rendering cannot occur. Consult
69
- * [[WebGLRenderCompatibilityInfo.contextErrorMessage]] for a possible description of what went wrong.
70
- */
71
- WebGLRenderCompatibilityStatus[WebGLRenderCompatibilityStatus["CannotCreateContext"] = 4] = "CannotCreateContext";
72
- })(WebGLRenderCompatibilityStatus = exports.WebGLRenderCompatibilityStatus || (exports.WebGLRenderCompatibilityStatus = {}));
73
- function createDefaultContext(canvas, useWebGL2 = true, attributes) {
74
- let context = useWebGL2 ? canvas.getContext("webgl2", attributes) : canvas.getContext("webgl", attributes);
75
- if (context === null && useWebGL2)
76
- context = canvas.getContext("webgl", attributes);
77
- return context !== null && context !== void 0 ? context : undefined;
78
- }
79
- /** This function returns information about the client system's level of compatibility with the iTwin.js rendering system, describing the client system's support for both optional and required features. It will also report if there is a major issue with the client system such as the browser falling back to software rendering or an inability to create a either a canvas or a WebGL rendering context.
80
- * @param useWebGL2 A boolean which will be passed to the createContext function in order to create the desired type of context; set this to `true` to use WebGL2, `false` to use WebGL1.
81
- * @param createContext A function of type [[ContextCreator]] that returns a WebGLContext. If not specified, this by default uses `canvas.getContext()` to create the WebGLContext.
82
- * @returns A [[WebGLRenderCompatibilityInfo]] object which contains a compatibility summary.
83
- * @see [[WebGLRenderCompatibilityInfo]]
84
- * @public
85
- */
86
- function queryRenderCompatibility(useWebGL2, createContext) {
87
- const canvas = document.createElement("canvas");
88
- if (null === canvas)
89
- return { status: WebGLRenderCompatibilityStatus.CannotCreateContext, missingOptionalFeatures: [], missingRequiredFeatures: [], userAgent: navigator.userAgent, driverBugs: {} };
90
- let errorMessage;
91
- canvas.addEventListener("webglcontextcreationerror", (event) => {
92
- errorMessage = event.statusMessage || "webglcontextcreationerror was triggered with no error provided";
93
- }, false);
94
- if (undefined === createContext)
95
- createContext = createDefaultContext;
96
- let hasMajorPerformanceCaveat = false;
97
- let context = createContext(canvas, useWebGL2, { failIfMajorPerformanceCaveat: true });
98
- if (undefined === context) {
99
- hasMajorPerformanceCaveat = true;
100
- context = createContext(canvas, useWebGL2); // try to create context without black-listed GPU
101
- if (undefined === context)
102
- return {
103
- status: WebGLRenderCompatibilityStatus.CannotCreateContext,
104
- missingOptionalFeatures: [],
105
- missingRequiredFeatures: [],
106
- userAgent: navigator.userAgent,
107
- contextErrorMessage: errorMessage,
108
- driverBugs: {},
109
- };
110
- }
111
- const capabilities = new Capabilities_1.Capabilities();
112
- const compatibility = capabilities.init(context, undefined);
113
- compatibility.contextErrorMessage = errorMessage;
114
- if (hasMajorPerformanceCaveat && compatibility.status !== WebGLRenderCompatibilityStatus.MissingRequiredFeatures)
115
- compatibility.status = WebGLRenderCompatibilityStatus.MajorPerformanceCaveat;
116
- return compatibility;
117
- }
118
- exports.queryRenderCompatibility = queryRenderCompatibility;
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module Compatibility
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.queryRenderCompatibility = exports.WebGLRenderCompatibilityStatus = exports.WebGLFeature = void 0;
11
+ const Capabilities_1 = require("./Capabilities");
12
+ /** Enumerates the required and optional WebGL features used by the [RenderSystem]($frontend).
13
+ * @public
14
+ */
15
+ var WebGLFeature;
16
+ (function (WebGLFeature) {
17
+ /** This feature allows transparent geometry to be rendered more efficiently, using 1 pass instead of 2. */
18
+ WebGLFeature["MrtTransparency"] = "mrt transparency";
19
+ /** This feature allows picking to occur more efficiently, using 1 pass instead of 3. */
20
+ WebGLFeature["MrtPick"] = "mrt pick";
21
+ /** This feature ensures large meshes (with more than 21,845 triangles) can be rendered. */
22
+ WebGLFeature["UintElementIndex"] = "uint element index";
23
+ /** This feature allows transparency to achieve the optimal quality. Without this feature, overlapping transparent geometry will "wash out" more easily. */
24
+ WebGLFeature["FloatRendering"] = "float rendering";
25
+ /** This feature allows for the display of non-3D classification data and solar shadows. */
26
+ WebGLFeature["DepthTexture"] = "depth texture";
27
+ /** This feature allows instancing of repeated geometry, which can reduce memory consumption. */
28
+ WebGLFeature["Instancing"] = "instancing";
29
+ /** This feature indicates that the system has enough texture units available for the shaders to run properly. */
30
+ WebGLFeature["MinimalTextureUnits"] = "minimal texture units";
31
+ /** Indicates that shadow maps are supported. Without this feature, shadows cannot be displayed. */
32
+ WebGLFeature["ShadowMaps"] = "shadow maps";
33
+ /** This feature allows a logarithmic depth buffer to be used. Without this feature, z-fighting will be much more likely to occur. */
34
+ WebGLFeature["FragDepth"] = "fragment depth";
35
+ /** This feature allows the renderer to achieve accurate contour lines for isoline and stepped delimiter modes of thematic display. */
36
+ WebGLFeature["StandardDerivatives"] = "standard derivatives";
37
+ /** This feature allows the renderer to smooth curved lines. */
38
+ WebGLFeature["AntiAliasing"] = "anti-aliasing";
39
+ })(WebGLFeature = exports.WebGLFeature || (exports.WebGLFeature = {}));
40
+ /** An enumeration that describes a general "compatibility rating" based on the contents of a [[WebGLRenderCompatibilityInfo]].
41
+ * @public
42
+ */
43
+ var WebGLRenderCompatibilityStatus;
44
+ (function (WebGLRenderCompatibilityStatus) {
45
+ /**
46
+ * Signifies that everything is ideal: context created successfully, all required and optional features are available,
47
+ * and browser did not signal a major performance caveat.
48
+ */
49
+ WebGLRenderCompatibilityStatus[WebGLRenderCompatibilityStatus["AllOkay"] = 0] = "AllOkay";
50
+ /**
51
+ * Signifies that the base requirements of compatibility are met but at least some optional features are missing.
52
+ * Consult the contents of [[WebGLRenderCompatibilityInfo.missingOptionalFeatures]].
53
+ */
54
+ WebGLRenderCompatibilityStatus[WebGLRenderCompatibilityStatus["MissingOptionalFeatures"] = 1] = "MissingOptionalFeatures";
55
+ /**
56
+ * Signifies that the base requirements of compatibility are met but WebGL reported a major performance caveat. The browser
57
+ * has likely fallen back to software rendering due to lack of a usable GPU.
58
+ * Consult [[WebGLRenderCompatibilityInfo.contextErrorMessage]] for a possible description of what went wrong.
59
+ * There could also be some missing optional features; consult the contents of [[WebGLRenderCompatibilityInfo.missingOptionalFeatures]].
60
+ */
61
+ WebGLRenderCompatibilityStatus[WebGLRenderCompatibilityStatus["MajorPerformanceCaveat"] = 2] = "MajorPerformanceCaveat";
62
+ /**
63
+ * Signifies that the base requirements of compatibility are not met; rendering cannot occur.
64
+ * Consult the contents of [[WebGLRenderCompatibilityInfo.missingRequiredFeatures]].
65
+ */
66
+ WebGLRenderCompatibilityStatus[WebGLRenderCompatibilityStatus["MissingRequiredFeatures"] = 3] = "MissingRequiredFeatures";
67
+ /**
68
+ * Signifies an inability to create either a canvas or a WebGL rendering context; rendering cannot occur. Consult
69
+ * [[WebGLRenderCompatibilityInfo.contextErrorMessage]] for a possible description of what went wrong.
70
+ */
71
+ WebGLRenderCompatibilityStatus[WebGLRenderCompatibilityStatus["CannotCreateContext"] = 4] = "CannotCreateContext";
72
+ })(WebGLRenderCompatibilityStatus = exports.WebGLRenderCompatibilityStatus || (exports.WebGLRenderCompatibilityStatus = {}));
73
+ function createDefaultContext(canvas, useWebGL2 = true, attributes) {
74
+ let context = useWebGL2 ? canvas.getContext("webgl2", attributes) : canvas.getContext("webgl", attributes);
75
+ if (context === null && useWebGL2)
76
+ context = canvas.getContext("webgl", attributes);
77
+ return context ?? undefined;
78
+ }
79
+ /** This function returns information about the client system's level of compatibility with the iTwin.js rendering system, describing the client system's support for both optional and required features. It will also report if there is a major issue with the client system such as the browser falling back to software rendering or an inability to create a either a canvas or a WebGL rendering context.
80
+ * @param useWebGL2 A boolean which will be passed to the createContext function in order to create the desired type of context; set this to `true` to use WebGL2, `false` to use WebGL1.
81
+ * @param createContext A function of type [[ContextCreator]] that returns a WebGLContext. If not specified, this by default uses `canvas.getContext()` to create the WebGLContext.
82
+ * @returns A [[WebGLRenderCompatibilityInfo]] object which contains a compatibility summary.
83
+ * @see [[WebGLRenderCompatibilityInfo]]
84
+ * @public
85
+ */
86
+ function queryRenderCompatibility(useWebGL2, createContext) {
87
+ const canvas = document.createElement("canvas");
88
+ if (null === canvas)
89
+ return { status: WebGLRenderCompatibilityStatus.CannotCreateContext, missingOptionalFeatures: [], missingRequiredFeatures: [], userAgent: navigator.userAgent, driverBugs: {} };
90
+ let errorMessage;
91
+ canvas.addEventListener("webglcontextcreationerror", (event) => {
92
+ errorMessage = event.statusMessage || "webglcontextcreationerror was triggered with no error provided";
93
+ }, false);
94
+ if (undefined === createContext)
95
+ createContext = createDefaultContext;
96
+ let hasMajorPerformanceCaveat = false;
97
+ let context = createContext(canvas, useWebGL2, { failIfMajorPerformanceCaveat: true });
98
+ if (undefined === context) {
99
+ hasMajorPerformanceCaveat = true;
100
+ context = createContext(canvas, useWebGL2); // try to create context without black-listed GPU
101
+ if (undefined === context)
102
+ return {
103
+ status: WebGLRenderCompatibilityStatus.CannotCreateContext,
104
+ missingOptionalFeatures: [],
105
+ missingRequiredFeatures: [],
106
+ userAgent: navigator.userAgent,
107
+ contextErrorMessage: errorMessage,
108
+ driverBugs: {},
109
+ };
110
+ }
111
+ const capabilities = new Capabilities_1.Capabilities();
112
+ const compatibility = capabilities.init(context, undefined);
113
+ compatibility.contextErrorMessage = errorMessage;
114
+ if (hasMajorPerformanceCaveat && compatibility.status !== WebGLRenderCompatibilityStatus.MissingRequiredFeatures)
115
+ compatibility.status = WebGLRenderCompatibilityStatus.MajorPerformanceCaveat;
116
+ return compatibility;
117
+ }
118
+ exports.queryRenderCompatibility = queryRenderCompatibility;
119
119
  //# sourceMappingURL=RenderCompatibility.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"RenderCompatibility.js","sourceRoot":"","sources":["../../src/RenderCompatibility.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,iDAA8C;AAO9C;;GAEG;AACH,IAAY,YAuBX;AAvBD,WAAY,YAAY;IACtB,2GAA2G;IAC3G,oDAAoC,CAAA;IACpC,wFAAwF;IACxF,oCAAoB,CAAA;IACpB,2FAA2F;IAC3F,u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C9G,aAAa,CAAC,MAAM,GAAG,8BAA8B,CAAC,sBAAsB,CAAC;IAE/E,OAAO,aAAa,CAAC;AACvB,CAAC;AArCD,4DAqCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Compatibility\r\n */\r\n\r\nimport { Capabilities } from \"./Capabilities\";\r\n\r\n/** A type describing either a WebGL 1 or WebGL 2 rendering context.\r\n * @public\r\n */\r\nexport type WebGLContext = WebGLRenderingContext | WebGL2RenderingContext;\r\n\r\n/** Enumerates the required and optional WebGL features used by the [RenderSystem]($frontend).\r\n * @public\r\n */\r\nexport enum WebGLFeature {\r\n /** This feature allows transparent geometry to be rendered more efficiently, using 1 pass instead of 2. */\r\n MrtTransparency = \"mrt transparency\",\r\n /** This feature allows picking to occur more efficiently, using 1 pass instead of 3. */\r\n MrtPick = \"mrt pick\",\r\n /** This feature ensures large meshes (with more than 21,845 triangles) can be rendered. */\r\n UintElementIndex = \"uint element index\",\r\n /** This feature allows transparency to achieve the optimal quality. Without this feature, overlapping transparent geometry will \"wash out\" more easily. */\r\n FloatRendering = \"float rendering\",\r\n /** This feature allows for the display of non-3D classification data and solar shadows. */\r\n DepthTexture = \"depth texture\",\r\n /** This feature allows instancing of repeated geometry, which can reduce memory consumption. */\r\n Instancing = \"instancing\",\r\n /** This feature indicates that the system has enough texture units available for the shaders to run properly. */\r\n MinimalTextureUnits = \"minimal texture units\",\r\n /** Indicates that shadow maps are supported. Without this feature, shadows cannot be displayed. */\r\n ShadowMaps = \"shadow maps\",\r\n /** This feature allows a logarithmic depth buffer to be used. Without this feature, z-fighting will be much more likely to occur. */\r\n FragDepth = \"fragment depth\",\r\n /** This feature allows the renderer to achieve accurate contour lines for isoline and stepped delimiter modes of thematic display. */\r\n StandardDerivatives = \"standard derivatives\",\r\n /** This feature allows the renderer to smooth curved lines. */\r\n AntiAliasing = \"anti-aliasing\",\r\n}\r\n\r\n/** An enumeration that describes a general \"compatibility rating\" based on the contents of a [[WebGLRenderCompatibilityInfo]].\r\n * @public\r\n */\r\nexport enum WebGLRenderCompatibilityStatus {\r\n /**\r\n * Signifies that everything is ideal: context created successfully, all required and optional features are available,\r\n * and browser did not signal a major performance caveat.\r\n */\r\n AllOkay,\r\n /**\r\n * Signifies that the base requirements of compatibility are met but at least some optional features are missing.\r\n * Consult the contents of [[WebGLRenderCompatibilityInfo.missingOptionalFeatures]].\r\n */\r\n MissingOptionalFeatures,\r\n /**\r\n * Signifies that the base requirements of compatibility are met but WebGL reported a major performance caveat. The browser\r\n * has likely fallen back to software rendering due to lack of a usable GPU.\r\n * Consult [[WebGLRenderCompatibilityInfo.contextErrorMessage]] for a possible description of what went wrong.\r\n * There could also be some missing optional features; consult the contents of [[WebGLRenderCompatibilityInfo.missingOptionalFeatures]].\r\n */\r\n MajorPerformanceCaveat,\r\n /**\r\n * Signifies that the base requirements of compatibility are not met; rendering cannot occur.\r\n * Consult the contents of [[WebGLRenderCompatibilityInfo.missingRequiredFeatures]].\r\n */\r\n MissingRequiredFeatures,\r\n /**\r\n * Signifies an inability to create either a canvas or a WebGL rendering context; rendering cannot occur. Consult\r\n * [[WebGLRenderCompatibilityInfo.contextErrorMessage]] for a possible description of what went wrong.\r\n */\r\n CannotCreateContext,\r\n}\r\n\r\n/** Known bugs associated with specific graphics drivers for which iTwin.js can apply workarounds to produce correct visualization.\r\n * An instance of this object will exist on the [[WebGLRenderCompatibilityInfo]] object returned by [[queryRenderCompatibility]].\r\n * @see [[WebGLRenderCompatibilityInfo]]\r\n * @public\r\n */\r\nexport interface GraphicsDriverBugs {\r\n /** If true, the graphics driver inappropriately applies the \"early Z\" optimization when a fragment shader writes to the depth buffer.\r\n * Early Z elides execution of the fragment shader if the depth test fails; but if the fragment shader contains code that can alter the depth, it\r\n * must be executed. The primary symptom of this bug is transparent geometry appearing to be behind opaque geometry despite actually being in front of it.\r\n *\r\n * Affects Intel HD/UHD Graphics 620/630.\r\n *\r\n * The workaround for this bug has minimal impact on performance and no impact on visual fidelity.\r\n */\r\n fragDepthDoesNotDisableEarlyZ?: true;\r\n /** If true, the graphics driver will hang when applying MSAA to a viewport.\r\n *\r\n * Known to affect certain mobile Mali chipsets (G71 and G76). May affect more.\r\n *\r\n * The workaround for this bug means MSAA cannot be enabled on those devices.\r\n */\r\n msaaWillHang?: true;\r\n}\r\n\r\n/** Describes the level of compatibility of a client device/browser with the iTwin.js rendering system.\r\n * @public\r\n */\r\nexport interface WebGLRenderCompatibilityInfo {\r\n /** Describes the overall status of rendering compatibility. */\r\n status: WebGLRenderCompatibilityStatus;\r\n /** Features that are required by the rendering system but not supported by the client. */\r\n missingRequiredFeatures: WebGLFeature[];\r\n /** Optional features unsupported by this client that would provide improved performance or quality if present. */\r\n missingOptionalFeatures: WebGLFeature[];\r\n /** Known bugs associated with the client's graphics driver for which iTwin.js can apply workarounds. */\r\n driverBugs: GraphicsDriverBugs;\r\n /** The user agent as reported by the browser. */\r\n userAgent: string;\r\n /** The renderer string reported by this client's graphics driver. */\r\n unmaskedRenderer?: string;\r\n /** The vendor string reported by this client's graphics driver. */\r\n unmaskedVendor?: string;\r\n /** If true, there is a likelihood that integrated graphics are being used. This can be used to warn users on systems with both integrated graphics and dedicated graphics that they should try to switch to their dedicated graphics for better performance.\r\n * @note This property has the possibility of providing false positives and negatives. A user should use this property mainly as a hint and manually verify what graphics chip is being used.\r\n */\r\n usingIntegratedGraphics?: boolean;\r\n /** If WebGL context creation failed, an error message supplied by the browser. */\r\n contextErrorMessage?: string;\r\n /** The WebGL context created by the browser and used to generate the compatibility report. */\r\n createdContext?: WebGLContext;\r\n}\r\n\r\n/** A function that creates and returns a WebGLContext given an HTMLCanvasElement, a boolean specifying whether to use WebGL2, and a WebGLContextAttributes object describing the desired context attributes.\r\n * @public\r\n */\r\nexport type ContextCreator = (canvas: HTMLCanvasElement, useWebGL2: boolean, inputContextAttributes?: WebGLContextAttributes) => WebGLContext | undefined;\r\n\r\nfunction createDefaultContext(canvas: HTMLCanvasElement, useWebGL2: boolean = true, attributes?: WebGLContextAttributes): WebGLContext | undefined {\r\n let context = useWebGL2 ? canvas.getContext(\"webgl2\", attributes) : canvas.getContext(\"webgl\", attributes);\r\n if (context === null && useWebGL2)\r\n context = canvas.getContext(\"webgl\", attributes);\r\n return context ?? undefined;\r\n}\r\n\r\n/** This function returns information about the client system's level of compatibility with the iTwin.js rendering system, describing the client system's support for both optional and required features. It will also report if there is a major issue with the client system such as the browser falling back to software rendering or an inability to create a either a canvas or a WebGL rendering context.\r\n * @param useWebGL2 A boolean which will be passed to the createContext function in order to create the desired type of context; set this to `true` to use WebGL2, `false` to use WebGL1.\r\n * @param createContext A function of type [[ContextCreator]] that returns a WebGLContext. If not specified, this by default uses `canvas.getContext()` to create the WebGLContext.\r\n * @returns A [[WebGLRenderCompatibilityInfo]] object which contains a compatibility summary.\r\n * @see [[WebGLRenderCompatibilityInfo]]\r\n * @public\r\n */\r\nexport function queryRenderCompatibility(useWebGL2: boolean, createContext?: ContextCreator): WebGLRenderCompatibilityInfo {\r\n const canvas = document.createElement(\"canvas\");\r\n if (null === canvas)\r\n return { status: WebGLRenderCompatibilityStatus.CannotCreateContext, missingOptionalFeatures: [], missingRequiredFeatures: [], userAgent: navigator.userAgent, driverBugs: { } };\r\n\r\n let errorMessage: string | undefined;\r\n canvas.addEventListener(\"webglcontextcreationerror\", (event) => {\r\n errorMessage = (event as WebGLContextEvent).statusMessage || \"webglcontextcreationerror was triggered with no error provided\";\r\n }, false);\r\n\r\n if (undefined === createContext)\r\n createContext = createDefaultContext;\r\n\r\n let hasMajorPerformanceCaveat = false;\r\n let context = createContext(canvas, useWebGL2, { failIfMajorPerformanceCaveat: true });\r\n if (undefined === context) {\r\n hasMajorPerformanceCaveat = true;\r\n context = createContext(canvas, useWebGL2); // try to create context without black-listed GPU\r\n if (undefined === context)\r\n return {\r\n status: WebGLRenderCompatibilityStatus.CannotCreateContext,\r\n missingOptionalFeatures: [],\r\n missingRequiredFeatures: [],\r\n userAgent: navigator.userAgent,\r\n contextErrorMessage: errorMessage,\r\n driverBugs: {},\r\n };\r\n }\r\n\r\n const capabilities = new Capabilities();\r\n const compatibility = capabilities.init(context, undefined);\r\n compatibility.contextErrorMessage = errorMessage;\r\n\r\n if (hasMajorPerformanceCaveat && compatibility.status !== WebGLRenderCompatibilityStatus.MissingRequiredFeatures)\r\n compatibility.status = WebGLRenderCompatibilityStatus.MajorPerformanceCaveat;\r\n\r\n return compatibility;\r\n}\r\n"]}
1
+ {"version":3,"file":"RenderCompatibility.js","sourceRoot":"","sources":["../../src/RenderCompatibility.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,iDAA8C;AAO9C;;GAEG;AACH,IAAY,YAuBX;AAvBD,WAAY,YAAY;IACtB,2GAA2G;IAC3G,oDAAoC,CAAA;IACpC,wFAAwF;IACxF,oCAAoB,CAAA;IACpB,2FAA2F;IAC3F,uDAAuC,CAAA;IACvC,2JAA2J;IAC3J,kDAAkC,CAAA;IAClC,2FAA2F;IAC3F,8CAA8B,CAAA;IAC9B,gGAAgG;IAChG,yCAAyB,CAAA;IACzB,iHAAiH;IACjH,6DAA6C,CAAA;IAC7C,mGAAmG;IACnG,0CAA0B,CAAA;IAC1B,qIAAqI;IACrI,4CAA4B,CAAA;IAC5B,sIAAsI;IACtI,4DAA4C,CAAA;IAC5C,+DAA+D;IAC/D,8CAA8B,CAAA;AAChC,CAAC,EAvBW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAuBvB;AAED;;GAEG;AACH,IAAY,8BA4BX;AA5BD,WAAY,8BAA8B;IACxC;;;OAGG;IACH,yFAAO,CAAA;IACP;;;OAGG;IACH,yHAAuB,CAAA;IACvB;;;;;OAKG;IACH,uHAAsB,CAAA;IACtB;;;OAGG;IACH,yHAAuB,CAAA;IACvB;;;OAGG;IAC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F,IAAI,SAAS,KAAK,OAAO,EAAE;QACzB,yBAAyB,GAAG,IAAI,CAAC;QACjC,OAAO,GAAG,aAAa,CAAC,MAAM,EAAE,SAAS,CAAC,CAAC,CAAC,iDAAiD;QAC7F,IAAI,SAAS,KAAK,OAAO;YACvB,OAAO;gBACL,MAAM,EAAE,8BAA8B,CAAC,mBAAmB;gBAC1D,uBAAuB,EAAE,EAAE;gBAC3B,uBAAuB,EAAE,EAAE;gBAC3B,SAAS,EAAE,SAAS,CAAC,SAAS;gBAC9B,mBAAmB,EAAE,YAAY;gBACjC,UAAU,EAAE,EAAE;aACf,CAAC;KACL;IAED,MAAM,YAAY,GAAG,IAAI,2BAAY,EAAE,CAAC;IACxC,MAAM,aAAa,GAAG,YAAY,CAAC,IAAI,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC;IAC5D,aAAa,CAAC,mBAAmB,GAAG,YAAY,CAAC;IAEjD,IAAI,yBAAyB,IAAI,aAAa,CAAC,MAAM,KAAK,8BAA8B,CAAC,uBAAuB;QAC9G,aAAa,CAAC,MAAM,GAAG,8BAA8B,CAAC,sBAAsB,CAAC;IAE/E,OAAO,aAAa,CAAC;AACvB,CAAC;AArCD,4DAqCC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Compatibility\n */\n\nimport { Capabilities } from \"./Capabilities\";\n\n/** A type describing either a WebGL 1 or WebGL 2 rendering context.\n * @public\n */\nexport type WebGLContext = WebGLRenderingContext | WebGL2RenderingContext;\n\n/** Enumerates the required and optional WebGL features used by the [RenderSystem]($frontend).\n * @public\n */\nexport enum WebGLFeature {\n /** This feature allows transparent geometry to be rendered more efficiently, using 1 pass instead of 2. */\n MrtTransparency = \"mrt transparency\",\n /** This feature allows picking to occur more efficiently, using 1 pass instead of 3. */\n MrtPick = \"mrt pick\",\n /** This feature ensures large meshes (with more than 21,845 triangles) can be rendered. */\n UintElementIndex = \"uint element index\",\n /** This feature allows transparency to achieve the optimal quality. Without this feature, overlapping transparent geometry will \"wash out\" more easily. */\n FloatRendering = \"float rendering\",\n /** This feature allows for the display of non-3D classification data and solar shadows. */\n DepthTexture = \"depth texture\",\n /** This feature allows instancing of repeated geometry, which can reduce memory consumption. */\n Instancing = \"instancing\",\n /** This feature indicates that the system has enough texture units available for the shaders to run properly. */\n MinimalTextureUnits = \"minimal texture units\",\n /** Indicates that shadow maps are supported. Without this feature, shadows cannot be displayed. */\n ShadowMaps = \"shadow maps\",\n /** This feature allows a logarithmic depth buffer to be used. Without this feature, z-fighting will be much more likely to occur. */\n FragDepth = \"fragment depth\",\n /** This feature allows the renderer to achieve accurate contour lines for isoline and stepped delimiter modes of thematic display. */\n StandardDerivatives = \"standard derivatives\",\n /** This feature allows the renderer to smooth curved lines. */\n AntiAliasing = \"anti-aliasing\",\n}\n\n/** An enumeration that describes a general \"compatibility rating\" based on the contents of a [[WebGLRenderCompatibilityInfo]].\n * @public\n */\nexport enum WebGLRenderCompatibilityStatus {\n /**\n * Signifies that everything is ideal: context created successfully, all required and optional features are available,\n * and browser did not signal a major performance caveat.\n */\n AllOkay,\n /**\n * Signifies that the base requirements of compatibility are met but at least some optional features are missing.\n * Consult the contents of [[WebGLRenderCompatibilityInfo.missingOptionalFeatures]].\n */\n MissingOptionalFeatures,\n /**\n * Signifies that the base requirements of compatibility are met but WebGL reported a major performance caveat. The browser\n * has likely fallen back to software rendering due to lack of a usable GPU.\n * Consult [[WebGLRenderCompatibilityInfo.contextErrorMessage]] for a possible description of what went wrong.\n * There could also be some missing optional features; consult the contents of [[WebGLRenderCompatibilityInfo.missingOptionalFeatures]].\n */\n MajorPerformanceCaveat,\n /**\n * Signifies that the base requirements of compatibility are not met; rendering cannot occur.\n * Consult the contents of [[WebGLRenderCompatibilityInfo.missingRequiredFeatures]].\n */\n MissingRequiredFeatures,\n /**\n * Signifies an inability to create either a canvas or a WebGL rendering context; rendering cannot occur. Consult\n * [[WebGLRenderCompatibilityInfo.contextErrorMessage]] for a possible description of what went wrong.\n */\n CannotCreateContext,\n}\n\n/** Known bugs associated with specific graphics drivers for which iTwin.js can apply workarounds to produce correct visualization.\n * An instance of this object will exist on the [[WebGLRenderCompatibilityInfo]] object returned by [[queryRenderCompatibility]].\n * @see [[WebGLRenderCompatibilityInfo]]\n * @public\n */\nexport interface GraphicsDriverBugs {\n /** If true, the graphics driver inappropriately applies the \"early Z\" optimization when a fragment shader writes to the depth buffer.\n * Early Z elides execution of the fragment shader if the depth test fails; but if the fragment shader contains code that can alter the depth, it\n * must be executed. The primary symptom of this bug is transparent geometry appearing to be behind opaque geometry despite actually being in front of it.\n *\n * Affects Intel HD/UHD Graphics 620/630.\n *\n * The workaround for this bug has minimal impact on performance and no impact on visual fidelity.\n */\n fragDepthDoesNotDisableEarlyZ?: true;\n /** If true, the graphics driver will hang when applying MSAA to a viewport.\n *\n * Known to affect certain mobile Mali chipsets (G71 and G76). May affect more.\n *\n * The workaround for this bug means MSAA cannot be enabled on those devices.\n */\n msaaWillHang?: true;\n}\n\n/** Describes the level of compatibility of a client device/browser with the iTwin.js rendering system.\n * @public\n */\nexport interface WebGLRenderCompatibilityInfo {\n /** Describes the overall status of rendering compatibility. */\n status: WebGLRenderCompatibilityStatus;\n /** Features that are required by the rendering system but not supported by the client. */\n missingRequiredFeatures: WebGLFeature[];\n /** Optional features unsupported by this client that would provide improved performance or quality if present. */\n missingOptionalFeatures: WebGLFeature[];\n /** Known bugs associated with the client's graphics driver for which iTwin.js can apply workarounds. */\n driverBugs: GraphicsDriverBugs;\n /** The user agent as reported by the browser. */\n userAgent: string;\n /** The renderer string reported by this client's graphics driver. */\n unmaskedRenderer?: string;\n /** The vendor string reported by this client's graphics driver. */\n unmaskedVendor?: string;\n /** If true, there is a likelihood that integrated graphics are being used. This can be used to warn users on systems with both integrated graphics and dedicated graphics that they should try to switch to their dedicated graphics for better performance.\n * @note This property has the possibility of providing false positives and negatives. A user should use this property mainly as a hint and manually verify what graphics chip is being used.\n */\n usingIntegratedGraphics?: boolean;\n /** If WebGL context creation failed, an error message supplied by the browser. */\n contextErrorMessage?: string;\n /** The WebGL context created by the browser and used to generate the compatibility report. */\n createdContext?: WebGLContext;\n}\n\n/** A function that creates and returns a WebGLContext given an HTMLCanvasElement, a boolean specifying whether to use WebGL2, and a WebGLContextAttributes object describing the desired context attributes.\n * @public\n */\nexport type ContextCreator = (canvas: HTMLCanvasElement, useWebGL2: boolean, inputContextAttributes?: WebGLContextAttributes) => WebGLContext | undefined;\n\nfunction createDefaultContext(canvas: HTMLCanvasElement, useWebGL2: boolean = true, attributes?: WebGLContextAttributes): WebGLContext | undefined {\n let context = useWebGL2 ? canvas.getContext(\"webgl2\", attributes) : canvas.getContext(\"webgl\", attributes);\n if (context === null && useWebGL2)\n context = canvas.getContext(\"webgl\", attributes);\n return context ?? undefined;\n}\n\n/** This function returns information about the client system's level of compatibility with the iTwin.js rendering system, describing the client system's support for both optional and required features. It will also report if there is a major issue with the client system such as the browser falling back to software rendering or an inability to create a either a canvas or a WebGL rendering context.\n * @param useWebGL2 A boolean which will be passed to the createContext function in order to create the desired type of context; set this to `true` to use WebGL2, `false` to use WebGL1.\n * @param createContext A function of type [[ContextCreator]] that returns a WebGLContext. If not specified, this by default uses `canvas.getContext()` to create the WebGLContext.\n * @returns A [[WebGLRenderCompatibilityInfo]] object which contains a compatibility summary.\n * @see [[WebGLRenderCompatibilityInfo]]\n * @public\n */\nexport function queryRenderCompatibility(useWebGL2: boolean, createContext?: ContextCreator): WebGLRenderCompatibilityInfo {\n const canvas = document.createElement(\"canvas\");\n if (null === canvas)\n return { status: WebGLRenderCompatibilityStatus.CannotCreateContext, missingOptionalFeatures: [], missingRequiredFeatures: [], userAgent: navigator.userAgent, driverBugs: { } };\n\n let errorMessage: string | undefined;\n canvas.addEventListener(\"webglcontextcreationerror\", (event) => {\n errorMessage = (event as WebGLContextEvent).statusMessage || \"webglcontextcreationerror was triggered with no error provided\";\n }, false);\n\n if (undefined === createContext)\n createContext = createDefaultContext;\n\n let hasMajorPerformanceCaveat = false;\n let context = createContext(canvas, useWebGL2, { failIfMajorPerformanceCaveat: true });\n if (undefined === context) {\n hasMajorPerformanceCaveat = true;\n context = createContext(canvas, useWebGL2); // try to create context without black-listed GPU\n if (undefined === context)\n return {\n status: WebGLRenderCompatibilityStatus.CannotCreateContext,\n missingOptionalFeatures: [],\n missingRequiredFeatures: [],\n userAgent: navigator.userAgent,\n contextErrorMessage: errorMessage,\n driverBugs: {},\n };\n }\n\n const capabilities = new Capabilities();\n const compatibility = capabilities.init(context, undefined);\n compatibility.contextErrorMessage = errorMessage;\n\n if (hasMajorPerformanceCaveat && compatibility.status !== WebGLRenderCompatibilityStatus.MissingRequiredFeatures)\n compatibility.status = WebGLRenderCompatibilityStatus.MajorPerformanceCaveat;\n\n return compatibility;\n}\n"]}
@@ -1,10 +1,10 @@
1
- export * from "./Capabilities";
2
- export * from "./RenderCompatibility";
3
- /** @docs-package-description
4
- * The webgl-compatibility package provides APIs for determining the level of compatibility of a browser+device with the iTwin.js rendering system.
5
- */
6
- /**
7
- * @docs-group-description Compatibility
8
- * APIs for evaluating compatibility with the iTwin.js rendering system.
9
- */
1
+ export * from "./Capabilities";
2
+ export * from "./RenderCompatibility";
3
+ /** @docs-package-description
4
+ * The webgl-compatibility package provides APIs for determining the level of compatibility of a browser+device with the iTwin.js rendering system.
5
+ */
6
+ /**
7
+ * @docs-group-description Compatibility
8
+ * APIs for evaluating compatibility with the iTwin.js rendering system.
9
+ */
10
10
  //# sourceMappingURL=webgl-compatibility.d.ts.map
@@ -1,26 +1,30 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
5
- }) : (function(o, m, k, k2) {
6
- if (k2 === undefined) k2 = k;
7
- o[k2] = m[k];
8
- }));
9
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
10
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
11
- };
12
- Object.defineProperty(exports, "__esModule", { value: true });
13
- /*---------------------------------------------------------------------------------------------
14
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
15
- * See LICENSE.md in the project root for license terms and full copyright notice.
16
- *--------------------------------------------------------------------------------------------*/
17
- __exportStar(require("./Capabilities"), exports);
18
- __exportStar(require("./RenderCompatibility"), exports);
19
- /** @docs-package-description
20
- * The webgl-compatibility package provides APIs for determining the level of compatibility of a browser+device with the iTwin.js rendering system.
21
- */
22
- /**
23
- * @docs-group-description Compatibility
24
- * APIs for evaluating compatibility with the iTwin.js rendering system.
25
- */
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ /*---------------------------------------------------------------------------------------------
18
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
19
+ * See LICENSE.md in the project root for license terms and full copyright notice.
20
+ *--------------------------------------------------------------------------------------------*/
21
+ __exportStar(require("./Capabilities"), exports);
22
+ __exportStar(require("./RenderCompatibility"), exports);
23
+ /** @docs-package-description
24
+ * The webgl-compatibility package provides APIs for determining the level of compatibility of a browser+device with the iTwin.js rendering system.
25
+ */
26
+ /**
27
+ * @docs-group-description Compatibility
28
+ * APIs for evaluating compatibility with the iTwin.js rendering system.
29
+ */
26
30
  //# sourceMappingURL=webgl-compatibility.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"webgl-compatibility.js","sourceRoot":"","sources":["../../src/webgl-compatibility.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,iDAA+B;AAC/B,wDAAsC;AAEtC;;GAEG;AAEH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\nexport * from \"./Capabilities\";\r\nexport * from \"./RenderCompatibility\";\r\n\r\n/** @docs-package-description\r\n * The webgl-compatibility package provides APIs for determining the level of compatibility of a browser+device with the iTwin.js rendering system.\r\n */\r\n\r\n/**\r\n * @docs-group-description Compatibility\r\n * APIs for evaluating compatibility with the iTwin.js rendering system.\r\n */\r\n"]}
1
+ {"version":3,"file":"webgl-compatibility.js","sourceRoot":"","sources":["../../src/webgl-compatibility.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA;;;+FAG+F;AAC/F,iDAA+B;AAC/B,wDAAsC;AAEtC;;GAEG;AAEH;;;GAGG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\nexport * from \"./Capabilities\";\nexport * from \"./RenderCompatibility\";\n\n/** @docs-package-description\n * The webgl-compatibility package provides APIs for determining the level of compatibility of a browser+device with the iTwin.js rendering system.\n */\n\n/**\n * @docs-group-description Compatibility\n * APIs for evaluating compatibility with the iTwin.js rendering system.\n */\n"]}
@@ -1,104 +1,104 @@
1
- /** @packageDocumentation
2
- * @module Compatibility
3
- */
4
- import { GraphicsDriverBugs, WebGLContext, WebGLFeature, WebGLRenderCompatibilityInfo } from "./RenderCompatibility";
5
- /** @internal */
6
- export declare type WebGLExtensionName = "WEBGL_draw_buffers" | "OES_element_index_uint" | "OES_texture_float" | "OES_texture_float_linear" | "OES_texture_half_float" | "OES_texture_half_float_linear" | "EXT_texture_filter_anisotropic" | "WEBGL_depth_texture" | "EXT_color_buffer_float" | "EXT_shader_texture_lod" | "ANGLE_instanced_arrays" | "OES_vertex_array_object" | "WEBGL_lose_context" | "EXT_frag_depth" | "EXT_disjoint_timer_query" | "EXT_disjoint_timer_query_webgl2" | "OES_standard_derivatives" | "EXT_float_blend";
7
- /** Describes the type of a render target. Used by Capabilities to represent maximum precision render target available on host system.
8
- * @internal
9
- */
10
- export declare enum RenderType {
11
- TextureUnsignedByte = 0,
12
- TextureHalfFloat = 1,
13
- TextureFloat = 2
14
- }
15
- /**
16
- * Describes the type of a depth buffer. Used by Capabilities to represent maximum depth buffer precision available on host system.
17
- * Note: the commented-out values are unimplemented but left in place for reference, in case desired for future implementation.
18
- * @internal
19
- */
20
- export declare enum DepthType {
21
- RenderBufferUnsignedShort16 = 0,
22
- TextureUnsignedInt24Stencil8 = 1,
23
- TextureUnsignedInt32 = 2
24
- }
25
- /** Describes the rendering capabilities of the host system.
26
- * @internal
27
- */
28
- export declare class Capabilities {
29
- private _maxRenderType;
30
- private _maxDepthType;
31
- private _maxTextureSize;
32
- private _maxColorAttachments;
33
- private _maxDrawBuffers;
34
- private _maxFragTextureUnits;
35
- private _maxVertTextureUnits;
36
- private _maxVertAttribs;
37
- private _maxVertUniformVectors;
38
- private _maxVaryingVectors;
39
- private _maxFragUniformVectors;
40
- private _maxAnisotropy?;
41
- private _maxAntialiasSamples;
42
- private _supportsCreateImageBitmap;
43
- private _maxTexSizeAllow;
44
- private _extensionMap;
45
- private _presentFeatures;
46
- private _isWebGL2;
47
- private _isMobile;
48
- private _driverBugs;
49
- get maxRenderType(): RenderType;
50
- get maxDepthType(): DepthType;
51
- get maxTextureSize(): number;
52
- get maxTexSizeAllow(): number;
53
- get supportsCreateImageBitmap(): boolean;
54
- get maxColorAttachments(): number;
55
- get maxDrawBuffers(): number;
56
- get maxFragTextureUnits(): number;
57
- get maxVertTextureUnits(): number;
58
- get maxVertAttribs(): number;
59
- get maxVertUniformVectors(): number;
60
- get maxVaryingVectors(): number;
61
- get maxFragUniformVectors(): number;
62
- get maxAntialiasSamples(): number;
63
- get isWebGL2(): boolean;
64
- get driverBugs(): GraphicsDriverBugs;
65
- /** These getters check for existence of extension objects to determine availability of features. In WebGL2, could just return true for some. */
66
- get supportsNonPowerOf2Textures(): boolean;
67
- get supportsDrawBuffers(): boolean;
68
- get supportsInstancing(): boolean;
69
- get supports32BitElementIndex(): boolean;
70
- get supportsTextureFloat(): boolean;
71
- get supportsTextureFloatLinear(): boolean;
72
- get supportsTextureHalfFloat(): boolean;
73
- get supportsTextureHalfFloatLinear(): boolean;
74
- get supportsTextureFilterAnisotropic(): boolean;
75
- get supportsShaderTextureLOD(): boolean;
76
- get supportsVertexArrayObjects(): boolean;
77
- get supportsFragDepth(): boolean;
78
- get supportsDisjointTimerQuery(): boolean;
79
- get supportsStandardDerivatives(): boolean;
80
- get supportsMRTTransparency(): boolean;
81
- get supportsMRTPickShaders(): boolean;
82
- get supportsShadowMaps(): boolean;
83
- get supportsAntiAliasing(): boolean;
84
- get isMobile(): boolean;
85
- private findExtension;
86
- /** Queries an extension object if available. This is necessary for other parts of the system to access some constants within extensions. */
87
- queryExtensionObject<T>(ext: WebGLExtensionName): T | undefined;
88
- static readonly optionalFeatures: WebGLFeature[];
89
- static readonly requiredFeatures: WebGLFeature[];
90
- private get _hasRequiredTextureUnits();
91
- /** Return an array containing any features not supported by the system as compared to the input array. */
92
- private _findMissingFeatures;
93
- /** Populate and return an array containing features that this system supports. */
94
- private _gatherFeatures;
95
- /** Retrieve compatibility status based on presence of various features. */
96
- private _getCompatibilityStatus;
97
- /** Initializes the capabilities based on a GL context. Must be called first. */
98
- init(gl: WebGLContext, disabledExtensions?: WebGLExtensionName[]): WebGLRenderCompatibilityInfo;
99
- static create(gl: WebGLContext, disabledExtensions?: WebGLExtensionName[]): Capabilities | undefined;
100
- /** Determines if a particular texture type is color-renderable on the host system. */
101
- private isTextureRenderable;
102
- setMaxAnisotropy(desiredMax: number | undefined, gl: WebGLContext): void;
103
- }
1
+ /** @packageDocumentation
2
+ * @module Compatibility
3
+ */
4
+ import { GraphicsDriverBugs, WebGLContext, WebGLFeature, WebGLRenderCompatibilityInfo } from "./RenderCompatibility";
5
+ /** @internal */
6
+ export type WebGLExtensionName = "WEBGL_draw_buffers" | "OES_element_index_uint" | "OES_texture_float" | "OES_texture_float_linear" | "OES_texture_half_float" | "OES_texture_half_float_linear" | "EXT_texture_filter_anisotropic" | "WEBGL_depth_texture" | "EXT_color_buffer_float" | "EXT_shader_texture_lod" | "ANGLE_instanced_arrays" | "OES_vertex_array_object" | "WEBGL_lose_context" | "EXT_frag_depth" | "EXT_disjoint_timer_query" | "EXT_disjoint_timer_query_webgl2" | "OES_standard_derivatives" | "EXT_float_blend";
7
+ /** Describes the type of a render target. Used by Capabilities to represent maximum precision render target available on host system.
8
+ * @internal
9
+ */
10
+ export declare enum RenderType {
11
+ TextureUnsignedByte = 0,
12
+ TextureHalfFloat = 1,
13
+ TextureFloat = 2
14
+ }
15
+ /**
16
+ * Describes the type of a depth buffer. Used by Capabilities to represent maximum depth buffer precision available on host system.
17
+ * Note: the commented-out values are unimplemented but left in place for reference, in case desired for future implementation.
18
+ * @internal
19
+ */
20
+ export declare enum DepthType {
21
+ RenderBufferUnsignedShort16 = 0,
22
+ TextureUnsignedInt24Stencil8 = 1,
23
+ TextureUnsignedInt32 = 2
24
+ }
25
+ /** Describes the rendering capabilities of the host system.
26
+ * @internal
27
+ */
28
+ export declare class Capabilities {
29
+ private _maxRenderType;
30
+ private _maxDepthType;
31
+ private _maxTextureSize;
32
+ private _maxColorAttachments;
33
+ private _maxDrawBuffers;
34
+ private _maxFragTextureUnits;
35
+ private _maxVertTextureUnits;
36
+ private _maxVertAttribs;
37
+ private _maxVertUniformVectors;
38
+ private _maxVaryingVectors;
39
+ private _maxFragUniformVectors;
40
+ private _maxAnisotropy?;
41
+ private _maxAntialiasSamples;
42
+ private _supportsCreateImageBitmap;
43
+ private _maxTexSizeAllow;
44
+ private _extensionMap;
45
+ private _presentFeatures;
46
+ private _isWebGL2;
47
+ private _isMobile;
48
+ private _driverBugs;
49
+ get maxRenderType(): RenderType;
50
+ get maxDepthType(): DepthType;
51
+ get maxTextureSize(): number;
52
+ get maxTexSizeAllow(): number;
53
+ get supportsCreateImageBitmap(): boolean;
54
+ get maxColorAttachments(): number;
55
+ get maxDrawBuffers(): number;
56
+ get maxFragTextureUnits(): number;
57
+ get maxVertTextureUnits(): number;
58
+ get maxVertAttribs(): number;
59
+ get maxVertUniformVectors(): number;
60
+ get maxVaryingVectors(): number;
61
+ get maxFragUniformVectors(): number;
62
+ get maxAntialiasSamples(): number;
63
+ get isWebGL2(): boolean;
64
+ get driverBugs(): GraphicsDriverBugs;
65
+ /** These getters check for existence of extension objects to determine availability of features. In WebGL2, could just return true for some. */
66
+ get supportsNonPowerOf2Textures(): boolean;
67
+ get supportsDrawBuffers(): boolean;
68
+ get supportsInstancing(): boolean;
69
+ get supports32BitElementIndex(): boolean;
70
+ get supportsTextureFloat(): boolean;
71
+ get supportsTextureFloatLinear(): boolean;
72
+ get supportsTextureHalfFloat(): boolean;
73
+ get supportsTextureHalfFloatLinear(): boolean;
74
+ get supportsTextureFilterAnisotropic(): boolean;
75
+ get supportsShaderTextureLOD(): boolean;
76
+ get supportsVertexArrayObjects(): boolean;
77
+ get supportsFragDepth(): boolean;
78
+ get supportsDisjointTimerQuery(): boolean;
79
+ get supportsStandardDerivatives(): boolean;
80
+ get supportsMRTTransparency(): boolean;
81
+ get supportsMRTPickShaders(): boolean;
82
+ get supportsShadowMaps(): boolean;
83
+ get supportsAntiAliasing(): boolean;
84
+ get isMobile(): boolean;
85
+ private findExtension;
86
+ /** Queries an extension object if available. This is necessary for other parts of the system to access some constants within extensions. */
87
+ queryExtensionObject<T>(ext: WebGLExtensionName): T | undefined;
88
+ static readonly optionalFeatures: WebGLFeature[];
89
+ static readonly requiredFeatures: WebGLFeature[];
90
+ private get _hasRequiredTextureUnits();
91
+ /** Return an array containing any features not supported by the system as compared to the input array. */
92
+ private _findMissingFeatures;
93
+ /** Populate and return an array containing features that this system supports. */
94
+ private _gatherFeatures;
95
+ /** Retrieve compatibility status based on presence of various features. */
96
+ private _getCompatibilityStatus;
97
+ /** Initializes the capabilities based on a GL context. Must be called first. */
98
+ init(gl: WebGLContext, disabledExtensions?: WebGLExtensionName[]): WebGLRenderCompatibilityInfo;
99
+ static create(gl: WebGLContext, disabledExtensions?: WebGLExtensionName[]): Capabilities | undefined;
100
+ /** Determines if a particular texture type is color-renderable on the host system. */
101
+ private isTextureRenderable;
102
+ setMaxAnisotropy(desiredMax: number | undefined, gl: WebGLContext): void;
103
+ }
104
104
  //# sourceMappingURL=Capabilities.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Capabilities.d.ts","sourceRoot":"","sources":["../../src/Capabilities.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EACL,kBAAkB,EAAE,YAAY,EAAE,YAAY,EAAE,4BAA4B,EAC7E,MAAM,uBAAuB,CAAC;AAE/B,gBAAgB;AAChB,oBAAY,kBAAkB,GAC5B,oBAAoB,GAAG,wBAAwB,GAAG,mBAAmB,GAAG,0BAA0B,GAClG,wBAAwB,GAAG,+BAA+B,GAAG,gCAAgC,GAAG,qBAAqB,GACrH,wBAAwB,GAAG,wBAAwB,GAAG,wBAAwB,GAAG,yBAAyB,GAAG,oBAAoB,GACjI,gBAAgB,GAAG,0BAA0B,GAAG,iCAAiC,GAAG,0BAA0B,GAAG,iBAAiB,CAAC;AAuBrI;;GAEG;AACH,oBAAY,UAAU;IACpB,mBAAmB,IAAA;IACnB,gBAAgB,IAAA;IAChB,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