Debian Codegraph @

api_webgl/extensions/WEBGL_lose_context/extension.xml

raw symbols SCIP
1 <?xml version="1.0"?>
2
3 <ratified href="WEBGL_lose_context/">
4 <name>WEBGL_lose_context</name>
5 <aliases>
6 <alias>WEBKIT_WEBGL_lose_context</alias>
7 <alias>MOZ_WEBGL_lose_context</alias>
8 </aliases>
9 <contact><a href="mailto:[email protected]">[email protected]</a></contact>
10 <contributors>
11 <contributor>Members of the <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a></contributor>
12 <contributor>Glenn Maynard</contributor>
13 </contributors>
14 <number>3</number>
15 <depends>
16 <api version="1.0"/>
17 </depends>
18 <overview>
19 <p>This extension exposes new functions which simulate losing and restoring the WebGL context, even on platforms where the context can never be lost. Consult the WebGL specification for documentation about the <code>webglcontextlost</code> and <code>webglcontextrestored</code> events.</p>
20 <p>When this extension is enabled:
21 <ul>
22 <li><code>loseContext</code> and <code>restoreContext</code> are allowed to generate INVALID_OPERATION errors even when the context is lost.</li>
23 </ul>
24 </p>
25 <p>
26 Note that this extension is <strong>not</strong> disconnected from the WebGLRenderingContext if that
27 object loses its context as described in "The Context Lost Event" of the WebGL specification, either
28 through use of this API or via actual circumstances such as a system failure.
29 </p>
30 </overview>
31 <idl xml:space="preserve">
32 [NoInterfaceObject]
33 interface WEBGL_lose_context {
34 void loseContext();
35 void restoreContext();
36 };
37 </idl>
38 <newfun>
39 <function name="loseContext" type="void">
40 <p>When this function is called and the context is not lost, simulate
41 losing the context so as to trigger the steps described in the WebGL
42 spec for handling context lost. The context will remain in the lost
43 state according to the WebGL specification until
44 <code>restoreContext()</code> is called. If the context is already
45 lost when this function is called, generate an
46 <code>INVALID_OPERATION</code> error.</p>
47
48 <p>Implementations should destroy the underlying graphics context and
49 all graphics resources when this method is called. This is the
50 recommended mechanism for applications to programmatically halt their
51 use of the WebGL API.</p>
52
53 </function>
54 <function name="restoreContext" type="void">
55 When this function is called while the context is lost, and the conditions
56 defined by the WebGL specification for restoring the context are
57 met, simulate the context being restored so as to trigger the steps
58 described in the WebGL spec for handling the context being restored.
59 If the context is already restored when this function is called, or if
60 the conditions in the WebGL specification for restoring the
61 context are not satisfied, or if the context was not lost via <code>loseContext()</code>,
62 generate an <code>INVALID_OPERATION</code> error.
63 </function>
64 </newfun>
65 <history>
66 <revision date="2011/01/11">
67 <change>Initial revision.</change>
68 </revision>
69 <revision date="2011/04/14">
70 <change>Added explicit restoreContext() method based on discussion on public_webgl list, to enable testing of scenario where context stays lost for a period of time.</change>
71 </revision>
72 <revision date="2011/11/08">
73 <change>Renamed from WEBKIT_lose_context to WEBGL_EXT_lose_context</change>
74 </revision>
75 <revision date="2011/11/11">
76 <change>Changed to make it clear this extension should follow the WebGL spec for the steps involved in handling losing and restoring the context rather than just fire events.</change>
77 </revision>
78 <revision date="2011/12/06">
79 <change>Added vendor-specific name strings for draft extension per discussion on WebGL mailing list</change>
80 <change>Renamed from WEBGL_EXT_lose_context to WEBGL_lose_context</change>
81 </revision>
82 <revision date="2011/12/07">
83 <change>Renamed "Name Strings" section to "Alias Name Strings".</change>
84 </revision>
85 <revision date="2012/01/03">
86 <change>Removed webgl module per changes to Web IDL spec.</change>
87 </revision>
88 <revision date="2013/01/26">
89 <change>Moved from draft to community approved status</change>
90 </revision>
91 <revision date="2013/05/15">
92 <change>Ratified by Khronos Board of Promoters.</change>
93 </revision>
94 <revision date="2013/06/05">
95 <change>Clarified error generation that conflicted with WebGL spec.</change>
96 </revision>
97 <revision date="2013/08/02">
98 <change>
99 Indicated that this extension is not disconnected from the WebGLRenderingContext
100 when that object loses its drawing buffer (i.e. when it performs the steps
101 outlined in "The Context Lost Event" of the WebGL specification).</change>
102 </revision>
103 <revision date="2014/05/08">
104 <change>Added INVALID_OPERATION for restoreContext() without loseContext()</change>
105 </revision>
106 <revision date="2014/07/15">
107 <change>Added NoInterfaceObject extended attribute.</change>
108 </revision>
109 <revision date="2017/02/03">
110 <change>Per discussion in working group, document that this extension
111 should destroy the underlying context and all graphics resources.</change>
112 </revision>
113 </history>
114 </ratified>