From 06a441a894cff011d28d450d6af6d6370a73189b Mon Sep 17 00:00:00 2001 From: Dean Jackson Date: Fri, 17 Mar 2017 04:48:24 +1100 Subject: [PATCH] Add a 'webglcontextchanged' event --- specs/latest/1.0/index.html | 39 ++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/specs/latest/1.0/index.html b/specs/latest/1.0/index.html index 40ad9e3489..356c7ffd8e 100644 --- a/specs/latest/1.0/index.html +++ b/specs/latest/1.0/index.html @@ -3195,7 +3195,8 @@

WebGLContextEvent

WebGL rendering context. Events are sent using the DOM Event System [DOM3EVENTS], and are dispatched to the HTMLCanvasElement associated with the WebGL rendering context. The types of status changes that can trigger a WebGLContextEvent event are - the loss of the context, the restoration of the context, and + the loss of the context, the restoration of the context, + a significant change in the system GPU's capabilities, and the inability to create a context.

@@ -3379,6 +3380,42 @@

The Context Restored Event

initializeGame(); +

The Context Changed Event

+ +

+ When the user agent detects that the capabilities of the + WebGLRenderingContext context have been significantly changed + by the system, such as parameters indicating the maximum values the + context supports, it must run the following steps: + +

    + +
  1. Let canvas be the context's + canvas.
  2. + +
  3. Queue a task to + perform the following step: + +
      + +
    1. Fire a WebGL context event named + "webglcontextchanged" at canvas, with its statusMessage attribute set + to "".
    2. + +
    + +
  4. +
+

+ +
+ This event is designed to be mostly informative, and usually only applicable to content + that has tested and exceeded the minimum requirements for some context limits. In this + case, on a system with multiple GPUs, if the underlying GPU that a context is using + is changed by the system to one that is less capable, the content may need to + reset itself for the new limits. The majority of content will not need to handle this event. +
+

The Context Creation Error Event