You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The **WEBGL_lose_context.loseContext()** method is part of the [WebGL API](/en-US/docs/Web/API/WebGL_API) and allows you to simulate losing
12
-
the context of a {{domxref("WebGLRenderingContext")}} context.
11
+
The **`loseContext()`** method of the `WEBGL_lose_context` extension is part of the [WebGL API](/en-US/docs/Web/API/WebGL_API) and allows you to simulate losing the context of a {{domxref("WebGLRenderingContext")}}.
13
12
14
-
It triggers the steps described in the WebGL specification for handling context lost.
15
-
The context will remain lost until {{domxref("WEBGL_lose_context.restoreContext()")}} is
16
-
called.
13
+
It triggers the [steps described in the WebGL specification](https://registry.khronos.org/webgl/specs/latest/1.0/#5.15.2) for handling context lost. The context will remain lost until {{domxref("WEBGL_lose_context.restoreContext()")}} is called. It also destroys the underlying graphics context and all graphics resources. This is the recommended mechanism for applications to programmatically halt their use of the WebGL API.
The **WEBGL_lose_context.restoreContext()** method is part of the [WebGL API](/en-US/docs/Web/API/WebGL_API) and allows you to simulate
12
-
restoring the context of a {{domxref("WebGLRenderingContext")}} object.
11
+
The **`restoreContext()`** method of the `WEBGL_lose_context` extension is part of the [WebGL API](/en-US/docs/Web/API/WebGL_API) and allows you to simulate restoring the context of a {{domxref("WebGLRenderingContext")}}.
12
+
13
+
It triggers the [steps described in the WebGL specification](https://registry.khronos.org/webgl/specs/latest/1.0/#5.15.3) for handling context restored. The context is not usable until the {{domxref("HTMLCanvasElement.webglcontextrestored_event", "webglcontextrestored")}} event is fired.
13
14
14
15
## Syntax
15
16
@@ -34,9 +35,7 @@ Browsers may not report WebGL errors by default. WebGL's error reporting works b
0 commit comments