OLD | NEW |
| (Empty) |
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" | |
2 "http://www.w3.org/TR/html4/strict.dtd"> | |
3 <html lang="en"> | |
4 <head> | |
5 <meta http-equiv="content-type" content="text/html; charset=utf-8"> | |
6 <title>WebGL WEBKIT_lose_context Extension Specification</title> | |
7 <link rel="stylesheet" type="text/css" href="../../resources/webgl-extension
.css" /> | |
8 <link rel="stylesheet" type="text/css" href="../../resources/default.css" /> | |
9 <script src="../../resources/jquery-1.3.2.min.js" type="text/javascript"></s
cript> | |
10 </head> | |
11 <!--begin-logo--> | |
12 <div> | |
13 <a href="http://webgl.org/"><img alt=WebGL height=72 src="../../resources/
WebGL-Logo.png" width=156></a> | |
14 <div class=right> | |
15 <a href="http://khronos.org/"><img alt=Khronos height=60 src="../../reso
urces/KhronosGroup-3D.png" width=220></a> | |
16 </div> | |
17 </div> | |
18 <!--end-logo--> | |
19 | |
20 <h1>WebGL WEBKIT_lose_context Extension Draft Specification</h1> | |
21 | |
22 <h2 class="no-toc">Name</h2> | |
23 <p> WEBKIT_lose_context </p> | |
24 | |
25 <h2 class="no-toc">Contact</h2> | |
26 <p> <a href="mailto:enne@chromium.org">enne@chromium.org</a> </p> | |
27 | |
28 <h2 class="no-toc">Contributors</h2> | |
29 <p> Members of the <a href="https://www.khronos.org/webgl/public-mailing-lis
t/">WebGL working group</a> </p> | |
30 <p> Glenn Maynard </p> | |
31 | |
32 <h2 class="no-toc">Status</h2> | |
33 <p> Draft; revision underway. Do not ship! | |
34 </p> | |
35 | |
36 <h2 class="no-toc">Version</h2> | |
37 <p> Last modified date: April 14, 2011 <br> | |
38 Revision: 2 | |
39 </p> | |
40 | |
41 <h2 class="no-toc">Number</h2> | |
42 <p> WebGL extension #3 </p> | |
43 | |
44 <h2 class="no-toc">Dependencies</h2> | |
45 <p> Written against the WebGL API 1.0 specification. </p> | |
46 | |
47 <h2 class="no-toc">Overview</h2> | |
48 <p> | |
49 This extension exposes new functions which simulate losing and restoring t
he WebGL context, even on platforms where the context can never be lost. Consul
t the WebGL specification for documentation about the <code>webglcontextlost</co
de> and <code>webglcontextrestored</code> events. | |
50 </p> | |
51 <h2 class="no-toc">IDL</h2> | |
52 <p> | |
53 <pre class="idl"> | |
54 module webgl { | |
55 | |
56 interface WEBKIT_lose_context { | |
57 void loseContext(); | |
58 void restoreContext(); | |
59 }; | |
60 | |
61 }; | |
62 </pre> | |
63 </p> | |
64 | |
65 <h2 class="no-toc">New Procedures and Functions</h2> | |
66 <h3 class="no-toc">void loseContext()</h3> | |
67 <p> | |
68 When this function is called and the context is not lost, a <code>webglconte
xtlost</code> event will be dispatched. The behavior of the WebGL context after
this event has been dispatched is identical to one after a real context lost ev
ent. The context will remain in the lost state according to the WebGL specifica
tion until <code>restoreContext()</code> is called. If the context is already l
ost when this function is called, an <code>INVALID_OPERATION</code> error will b
e generated and no event will be dispatched. | |
69 </p> | |
70 <h3 class="no-toc">void restoreContext()</h3> | |
71 <p> | |
72 When this function is called, the context is lost, and the conditions define
d by the WebGL specification for delivery of the <code>webglcontextrestored</cod
e> event have been satisfied, a <code>webglcontextrestored</code> event will be
dispatched. The behavior of the WebGL context after this event has been dispatc
hed is identical to one after a real context restored event. If the context is
already restored when this function is called, or if the conditions in the WebGL
specification for delivery of the <code>webglcontextrestored</code> event are n
ot satisfied, an <code>INVALID_OPERATION</code> error will be generated and no e
vent will be dispatched. | |
73 </p> | |
74 | |
75 <h2 class="no-toc">Revision History</h2> | |
76 <p> | |
77 Revision 1, 2011/01/11 | |
78 <ul> | |
79 <li> Initial revision. | |
80 </ul> | |
81 </p> | |
82 <p> | |
83 Revision 2, 2011/04/14 | |
84 <ul> | |
85 <li> 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. | |
86 </ul> | |
87 </p> | |
88 </body> | |
89 </html> | |
OLD | NEW |