Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge pull request #100 from msc-hi/master

Require texture{_half,}_float to implicitly enable color_buffer{_half,}_float
  • Loading branch information...
commit 4e174ac47d7b922c807afacb68dbf315a7ab8501 2 parents f363ccc + ac53e47
@kenrussell kenrussell authored
View
77 extensions/OES_texture_float/extension.xml
@@ -1,57 +1,76 @@
-<?xml version="1.0"?>
-
+<?xml version="1.0" encoding="UTF-8"?>
<extension href="OES_texture_float/">
<name>OES_texture_float</name>
- <contact>
- <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
- </contact>
+
+ <contact> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL
+ working group</a> (public_webgl 'at' khronos.org) </contact>
+
<contributors>
<contributor>Members of the WebGL working group</contributor>
</contributors>
+
<number>1</number>
+
<depends>
<api version="1.0"/>
</depends>
+
<overview>
- <mirrors href="http://www.khronos.org/registry/gles/extensions/OES/OES_texture_float.txt" name="OES_texture_float">
- <addendum>Optional support for <code>FLOAT</code> textures as FBO attachments.</addendum>
+ <mirrors href="http://www.khronos.org/registry/gles/extensions/OES/OES_texture_float.txt"
+ name="OES_texture_float">
+ <addendum>Optional support for <code>FLOAT</code> textures as FBO
+ attachments (deprecated).</addendum>
</mirrors>
+
<features>
- <feature>
- The <code>texImage2D</code> and <code>texSubImage2D</code> entry points
- taking <code>ArrayBufferView</code> are extended to accept <code>Float32Array</code> with
- the pixel type <code>FLOAT</code>.
- </feature>
- <feature>
- The <code>texImage2D</code> and <code>texSubImage2D</code> entry points
- taking <code>ImageData</code>, <code>HTMLImageElement</code>, <code>HTMLCanvasElement</code>
- and <code>HTMLVideoElement</code> are extended to accept the pixel type <code>FLOAT</code>.
- </feature>
- <feature>
- The WebGL implementation may optionally accept a texture with pixel
- type <code>FLOAT</code> as the color attachment to an FBO. Applications must check such
- an FBO for completeness after attempting to make this attachment.
+ <feature> The <code>texImage2D</code> and <code>texSubImage2D</code>
+ entry points taking <code>ArrayBufferView</code> are extended to accept
+ <code>Float32Array</code> with the pixel type <code>FLOAT</code>.
</feature>
+
+ <feature> The <code>texImage2D</code> and <code>texSubImage2D</code>
+ entry points taking <code>ImageData</code>,
+ <code>HTMLImageElement</code>, <code>HTMLCanvasElement</code> and
+ <code>HTMLVideoElement</code> are extended to accept the pixel type
+ <code>FLOAT</code>. </feature>
+
+ <feature>Implementations supporting float rendering via this extension
+ will implicitly enable the <a
+ href="WEBGL_color_buffer_float.html">WEBGL_color_buffer_float</a>
+ extension and follow its requirements. This ensures correct behavior
+ when a texture with pixel type <code>FLOAT</code> is attached to an FBO.
+ Although this feature has historically been allowed, new implementations
+ should not implicitly support float rendering and applications should be
+ modified to explicitly enable <a
+ href="WEBGL_color_buffer_float.html">WEBGL_color_buffer_float</a>.</feature>
</features>
</overview>
- <idl>
-interface OES_texture_float {
-};
- </idl>
+
+ <idl> interface OES_texture_float { }; </idl>
+
<history>
<revision date="2010/11/29">
<change>Initial revision.</change>
</revision>
+
<revision date="2010/12/13">
- <change>Extended to support pixel type FLOAT for texImage2D and texSubImage2D entry points taking ImageData, HTMLImageElement, HTMLCanvasElement and HTMLVideoElement.
- </change>
+ <change>Extended to support pixel type FLOAT for texImage2D and
+ texSubImage2D entry points taking ImageData, HTMLImageElement,
+ HTMLCanvasElement and HTMLVideoElement. </change>
</revision>
+
<revision date="2011/09/12">
- <change>Added optional ability to use a FLOAT type texture as an FBO's color attachment.
- </change>
+ <change>Added optional ability to use a FLOAT type texture as an FBO's
+ color attachment. </change>
</revision>
+
<revision date="2012/01/03">
<change>Removed webgl module per changes to Web IDL spec.</change>
</revision>
+
+ <revision date="2012/12/04">
+ <change>Specify that implementations supporting FLOAT color attachments
+ implicitly enable WEBGL_color_buffer_float.</change>
+ </revision>
</history>
</extension>
View
59 extensions/OES_texture_float/index.html
@@ -13,14 +13,13 @@
<h2 class="no-toc">Name</h2>
<p>OES_texture_float</p>
<h2 class="no-toc">Contact</h2>
-<p>
- <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
- </p>
+<p> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL
+ working group</a> (public_webgl 'at' khronos.org) </p>
<h2 class="no-toc">Contributors</h2>
<p>Members of the WebGL working group</p>
<h2 class="no-toc">Version</h2>
-<p> Last modified date: January 03, 2012<br>
- Revision: 4</p>
+<p> Last modified date: December 04, 2012<br>
+ Revision: 5</p>
<h2 class="no-toc">Number</h2>
<p> WebGL extension #1</p>
<h2 class="no-toc">Dependencies</h2>
@@ -30,43 +29,47 @@ <h2 class="no-toc">Overview</h2>
<a href="http://www.khronos.org/registry/gles/extensions/OES/OES_texture_float.txt">OES_texture_float</a> functionality to
WebGL. The following WebGL-specific behavioral changes apply:
- <ul><li>Optional support for <code>FLOAT</code> textures as FBO attachments.</li></ul></p>
+ <ul><li>Optional support for <code>FLOAT</code> textures as FBO
+ attachments (deprecated).</li></ul></p>
<p>
Consult the above extension for documentation, issues and new functions and enumerants.
</p>
+
<p> When this extension is enabled: </p>
<ul>
-<li>
- The <code>texImage2D</code> and <code>texSubImage2D</code> entry points
- taking <code>ArrayBufferView</code> are extended to accept <code>Float32Array</code> with
- the pixel type <code>FLOAT</code>.
- </li>
-<li>
- The <code>texImage2D</code> and <code>texSubImage2D</code> entry points
- taking <code>ImageData</code>, <code>HTMLImageElement</code>, <code>HTMLCanvasElement</code>
- and <code>HTMLVideoElement</code> are extended to accept the pixel type <code>FLOAT</code>.
- </li>
-<li>
- The WebGL implementation may optionally accept a texture with pixel
- type <code>FLOAT</code> as the color attachment to an FBO. Applications must check such
- an FBO for completeness after attempting to make this attachment.
+<li> The <code>texImage2D</code> and <code>texSubImage2D</code>
+ entry points taking <code>ArrayBufferView</code> are extended to accept
+ <code>Float32Array</code> with the pixel type <code>FLOAT</code>.
</li>
+<li> The <code>texImage2D</code> and <code>texSubImage2D</code>
+ entry points taking <code>ImageData</code>,
+ <code>HTMLImageElement</code>, <code>HTMLCanvasElement</code> and
+ <code>HTMLVideoElement</code> are extended to accept the pixel type
+ <code>FLOAT</code>. </li>
+<li>Implementations supporting float rendering via this extension
+ will implicitly enable the <a href="WEBGL_color_buffer_float.html">WEBGL_color_buffer_float</a>
+ extension and follow its requirements. This ensures correct behavior
+ when a texture with pixel type <code>FLOAT</code> is attached to an FBO.
+ Although this feature has historically been allowed, new implementations
+ should not implicitly support float rendering and applications should be
+ modified to explicitly enable <a href="WEBGL_color_buffer_float.html">WEBGL_color_buffer_float</a>.</li>
</ul>
<h2 class="no-toc">IDL</h2>
-<p><pre class="idl">
-interface OES_texture_float {
-};
- </pre></p>
+<p><pre class="idl"> interface OES_texture_float { }; </pre></p>
<h2 class="no-toc">Revision History</h2>
<p>Revision 1, 2010/11/29</p>
<ul><li>Initial revision.</li></ul>
<p>Revision 2, 2010/12/13</p>
-<ul><li>Extended to support pixel type FLOAT for texImage2D and texSubImage2D entry points taking ImageData, HTMLImageElement, HTMLCanvasElement and HTMLVideoElement.
- </li></ul>
+<ul><li>Extended to support pixel type FLOAT for texImage2D and
+ texSubImage2D entry points taking ImageData, HTMLImageElement,
+ HTMLCanvasElement and HTMLVideoElement. </li></ul>
<p>Revision 3, 2011/09/12</p>
-<ul><li>Added optional ability to use a FLOAT type texture as an FBO's color attachment.
- </li></ul>
+<ul><li>Added optional ability to use a FLOAT type texture as an FBO's
+ color attachment. </li></ul>
<p>Revision 4, 2012/01/03</p>
<ul><li>Removed webgl module per changes to Web IDL spec.</li></ul>
+<p>Revision 5, 2012/12/04</p>
+<ul><li>Specify that implementations supporting FLOAT color attachments
+ implicitly enable WEBGL_color_buffer_float.</li></ul>
</body>
</html>
View
80 extensions/OES_texture_half_float/extension.xml
@@ -1,58 +1,74 @@
-<?xml version="1.0"?>
-
+<?xml version="1.0" encoding="UTF-8"?>
<extension href="OES_texture_half_float/">
<name>OES_texture_half_float</name>
- <contact>
- <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
- </contact>
+
+ <contact> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL
+ working group</a> (public_webgl 'at' khronos.org) </contact>
+
<contributors>
<contributor>Members of the WebGL working group</contributor>
</contributors>
+
<number>2</number>
+
<depends>
<api version="1.0"/>
</depends>
+
<overview>
- <mirrors href="http://www.khronos.org/registry/gles/extensions/OES/OES_texture_float.txt" name="OES_texture_half_float">
- <addendum>Optional support for <code>HALF_FLOAT</code> textures as FBO attachments.</addendum>
+ <mirrors href="http://www.khronos.org/registry/gles/extensions/OES/OES_texture_float.txt"
+ name="OES_texture_half_float">
+ <addendum>Optional support for <code>HALF_FLOAT</code> textures as FBO
+ attachments (deprecated).</addendum>
</mirrors>
+
<features>
- <feature>
- The <code>texImage2D</code> and <code>texSubImage2D</code> entry points
- taking <code>ArrayBufferView</code> are extended to accept <code>null</code> with
- the pixel type <code>HALF_FLOAT_OES</code>.
- </feature>
- <feature>
- The <code>texImage2D</code> and <code>texSubImage2D</code> entry points
- taking <code>ImageData</code>, <code>HTMLImageElement</code>, <code>HTMLCanvasElement</code>
- and <code>HTMLVideoElement</code> are extended to accept the pixel type <code>HALF_FLOAT_OES</code>.
- </feature>
- <feature>
- The WebGL implementation may optionally accept a texture with pixel
- type <code>HALF_FLOAT_OES</code> as the color attachment to an FBO. Applications must
- check such an FBO for completeness after attempting to make this attachment.
+ <feature> The <code>texImage2D</code> and <code>texSubImage2D</code>
+ entry points taking <code>ArrayBufferView</code> are extended to accept
+ <code>null</code> with the pixel type <code>HALF_FLOAT_OES</code>.
</feature>
+
+ <feature> The <code>texImage2D</code> and <code>texSubImage2D</code>
+ entry points taking <code>ImageData</code>,
+ <code>HTMLImageElement</code>, <code>HTMLCanvasElement</code> and
+ <code>HTMLVideoElement</code> are extended to accept the pixel type
+ <code>HALF_FLOAT_OES</code>. </feature>
+
+ <feature>Implementations supporting float rendering via this extension
+ will implicitly enable the <a
+ href="OES_color_buffer_half_float.html">OES_color_buffer_half_float</a>
+ extension and follow its requirements. This ensures correct behavior
+ when a texture with pixel type <code>HALF_FLOAT_OES</code> is attached
+ to an FBO. Although this feature has historically been allowed, new
+ implementations should not implicitly support float rendering and
+ applications should be modified to explicitly enable <a
+ href="OES_color_buffer_half_float.html">OES_color_buffer_half_float</a>.</feature>
</features>
</overview>
- <idl>
-interface OES_texture_half_float {
- const GLenum HALF_FLOAT_OES = 0x8D61;
-};
- </idl>
+
+ <idl> interface OES_texture_half_float { const GLenum HALF_FLOAT_OES =
+ 0x8D61; }; </idl>
+
<history>
<revision date="2010/11/29">
<change>Initial revision.</change>
</revision>
+
<revision date="2011/09/12">
- <change>
- Added similar text about <code>texImage2D</code> and <code>texSubImage2D</code> as in OES_texture_float spec.
- </change>
- <change>
- Added optional ability to use a HALF_FLOAT_OES type texture as an FBO's color attachment.
- </change>
+ <change> Added similar text about <code>texImage2D</code> and
+ <code>texSubImage2D</code> as in OES_texture_float spec. </change>
+
+ <change> Added optional ability to use a HALF_FLOAT_OES type texture as
+ an FBO's color attachment. </change>
</revision>
+
<revision date="2012/01/03">
<change>Removed webgl module per changes to Web IDL spec.</change>
</revision>
+
+ <revision date="2012/12/04">
+ <change>Specify that implementations supporting HALF_FLOAT_OES color
+ attachments implicitly enable EXT_color_buffer_half_float.</change>
+ </revision>
</history>
</extension>
View
62 extensions/OES_texture_half_float/index.html
@@ -13,14 +13,13 @@
<h2 class="no-toc">Name</h2>
<p>OES_texture_half_float</p>
<h2 class="no-toc">Contact</h2>
-<p>
- <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL working group</a> (public_webgl 'at' khronos.org)
- </p>
+<p> <a href="https://www.khronos.org/webgl/public-mailing-list/">WebGL
+ working group</a> (public_webgl 'at' khronos.org) </p>
<h2 class="no-toc">Contributors</h2>
<p>Members of the WebGL working group</p>
<h2 class="no-toc">Version</h2>
-<p> Last modified date: January 03, 2012<br>
- Revision: 3</p>
+<p> Last modified date: December 04, 2012<br>
+ Revision: 4</p>
<h2 class="no-toc">Number</h2>
<p> WebGL extension #2</p>
<h2 class="no-toc">Dependencies</h2>
@@ -30,47 +29,48 @@ <h2 class="no-toc">Overview</h2>
<a href="http://www.khronos.org/registry/gles/extensions/OES/OES_texture_float.txt">OES_texture_half_float</a> functionality to
WebGL. The following WebGL-specific behavioral changes apply:
- <ul><li>Optional support for <code>HALF_FLOAT</code> textures as FBO attachments.</li></ul></p>
+ <ul><li>Optional support for <code>HALF_FLOAT</code> textures as FBO
+ attachments (deprecated).</li></ul></p>
<p>
Consult the above extension for documentation, issues and new functions and enumerants.
</p>
+
<p> When this extension is enabled: </p>
<ul>
-<li>
- The <code>texImage2D</code> and <code>texSubImage2D</code> entry points
- taking <code>ArrayBufferView</code> are extended to accept <code>null</code> with
- the pixel type <code>HALF_FLOAT_OES</code>.
- </li>
-<li>
- The <code>texImage2D</code> and <code>texSubImage2D</code> entry points
- taking <code>ImageData</code>, <code>HTMLImageElement</code>, <code>HTMLCanvasElement</code>
- and <code>HTMLVideoElement</code> are extended to accept the pixel type <code>HALF_FLOAT_OES</code>.
- </li>
-<li>
- The WebGL implementation may optionally accept a texture with pixel
- type <code>HALF_FLOAT_OES</code> as the color attachment to an FBO. Applications must
- check such an FBO for completeness after attempting to make this attachment.
+<li> The <code>texImage2D</code> and <code>texSubImage2D</code>
+ entry points taking <code>ArrayBufferView</code> are extended to accept
+ <code>null</code> with the pixel type <code>HALF_FLOAT_OES</code>.
</li>
+<li> The <code>texImage2D</code> and <code>texSubImage2D</code>
+ entry points taking <code>ImageData</code>,
+ <code>HTMLImageElement</code>, <code>HTMLCanvasElement</code> and
+ <code>HTMLVideoElement</code> are extended to accept the pixel type
+ <code>HALF_FLOAT_OES</code>. </li>
+<li>Implementations supporting float rendering via this extension
+ will implicitly enable the <a href="OES_color_buffer_half_float.html">OES_color_buffer_half_float</a>
+ extension and follow its requirements. This ensures correct behavior
+ when a texture with pixel type <code>HALF_FLOAT_OES</code> is attached
+ to an FBO. Although this feature has historically been allowed, new
+ implementations should not implicitly support float rendering and
+ applications should be modified to explicitly enable <a href="OES_color_buffer_half_float.html">OES_color_buffer_half_float</a>.</li>
</ul>
<h2 class="no-toc">IDL</h2>
-<p><pre class="idl">
-interface OES_texture_half_float {
- const GLenum HALF_FLOAT_OES = 0x8D61;
-};
- </pre></p>
+<p><pre class="idl"> interface OES_texture_half_float { const GLenum HALF_FLOAT_OES =
+ 0x8D61; }; </pre></p>
<h2 class="no-toc">Revision History</h2>
<p>Revision 1, 2010/11/29</p>
<ul><li>Initial revision.</li></ul>
<p>Revision 2, 2011/09/12</p>
<ul>
-<li>
- Added similar text about <code>texImage2D</code> and <code>texSubImage2D</code> as in OES_texture_float spec.
- </li>
-<li>
- Added optional ability to use a HALF_FLOAT_OES type texture as an FBO's color attachment.
- </li>
+<li> Added similar text about <code>texImage2D</code> and
+ <code>texSubImage2D</code> as in OES_texture_float spec. </li>
+<li> Added optional ability to use a HALF_FLOAT_OES type texture as
+ an FBO's color attachment. </li>
</ul>
<p>Revision 3, 2012/01/03</p>
<ul><li>Removed webgl module per changes to Web IDL spec.</li></ul>
+<p>Revision 4, 2012/12/04</p>
+<ul><li>Specify that implementations supporting HALF_FLOAT_OES color
+ attachments implicitly enable EXT_color_buffer_half_float.</li></ul>
</body>
</html>
View
14 extensions/index.atom
@@ -1,8 +1,14 @@
<?xml version="1.0"?>
-<feed xmlns="http://www.w3.org/2005/Atom"><title>WebGL Extension Registry Revisions</title><link href="http://www.khronos.org/registry/webgl/extensions/index.atom" rel="self" type="application/atom+xml"/><link href="http://www.khronos.org/registry/webgl/extensions/" rel="alternate" type="text/html"/><id>http://www.khronos.org/registry/webgl/extensions/index.atom</id><updated>2012-11-26T23:59:59Z</updated><author>
+<feed xmlns="http://www.w3.org/2005/Atom"><title>WebGL Extension Registry Revisions</title><link href="http://www.khronos.org/registry/webgl/extensions/index.atom" rel="self" type="application/atom+xml"/><link href="http://www.khronos.org/registry/webgl/extensions/" rel="alternate" type="text/html"/><id>http://www.khronos.org/registry/webgl/extensions/index.atom</id><updated>2012-12-04T23:59:59Z</updated><author>
<name>WebGL Working Group</name>
<email>public_webgl@khronos.org</email>
- </author><entry><title>WEBGL_color_buffer_float : revision 4</title><link rel="alternate" type="text/html" href="WEBGL_color_buffer_float"/><id>WEBGL_color_buffer_float#r=4</id><updated>2012-11-26T23:59:59Z</updated><summary>Move to draft.
+ </author><entry><title>OES_texture_float : revision 5</title><link rel="alternate" type="text/html" href="OES_texture_float/"/><id>OES_texture_float/#r=5</id><updated>2012-12-04T23:59:59Z</updated><summary>Specify that implementations supporting FLOAT color attachments
+ implicitly enable WEBGL_color_buffer_float.
+
+ </summary></entry><entry><title>OES_texture_half_float : revision 4</title><link rel="alternate" type="text/html" href="OES_texture_half_float/"/><id>OES_texture_half_float/#r=4</id><updated>2012-12-04T23:59:59Z</updated><summary>Specify that implementations supporting HALF_FLOAT_OES color
+ attachments implicitly enable EXT_color_buffer_half_float.
+
+ </summary></entry><entry><title>WEBGL_color_buffer_float : revision 4</title><link rel="alternate" type="text/html" href="WEBGL_color_buffer_float"/><id>WEBGL_color_buffer_float#r=4</id><updated>2012-11-26T23:59:59Z</updated><summary>Move to draft.
</summary></entry><entry><title>EXT_color_buffer_half_float : revision 3</title><link rel="alternate" type="text/html" href="EXT_color_buffer_half_float"/><id>EXT_color_buffer_half_float#r=3</id><updated>2012-11-26T23:59:59Z</updated><summary>Move to draft.
@@ -20,8 +26,4 @@
</summary></entry><entry><title>OES_vertex_array_object : revision 7</title><link rel="alternate" type="text/html" href="OES_vertex_array_object/"/><id>OES_vertex_array_object/#r=7</id><updated>2012-10-16T23:59:59Z</updated><summary>Based on feedback on public_webgl, moved from draft to community approved, and removed aliases.
- </summary></entry><entry><title>OES_element_index_uint : revision 4</title><link rel="alternate" type="text/html" href="OES_element_index_uint/"/><id>OES_element_index_uint/#r=4</id><updated>2012-10-16T23:59:59Z</updated><summary>Based on feedback on public_webgl, moved from draft to community approved, and removed aliases.
-
- </summary></entry><entry><title>OES_vertex_array_object : revision 6</title><link rel="alternate" type="text/html" href="OES_vertex_array_object/"/><id>OES_vertex_array_object/#r=6</id><updated>2012-09-24T23:59:59Z</updated><summary>Added resolution to deleted buffer issue
-
</summary></entry></feed>
View
14 extensions/index.html
@@ -234,6 +234,14 @@ <h2 class="no-toc">Proposed WebGL Extensions (do not implement!)</h2>
<h2 class="no-toc">Recent WebGL Extension Revisions</h2>
<ol>
<li>
+<a href="OES_texture_float/">OES_texture_float</a> : revision 5 on <time>December 04, 2012</time><ul><li>Specify that implementations supporting FLOAT color attachments
+ implicitly enable WEBGL_color_buffer_float.</li></ul>
+</li>
+<li>
+<a href="OES_texture_half_float/">OES_texture_half_float</a> : revision 4 on <time>December 04, 2012</time><ul><li>Specify that implementations supporting HALF_FLOAT_OES color
+ attachments implicitly enable EXT_color_buffer_half_float.</li></ul>
+</li>
+<li>
<a href="WEBGL_color_buffer_float">WEBGL_color_buffer_float</a> : revision 4 on <time>November 26, 2012</time><ul><li>Move to draft.</li></ul>
</li>
<li>
@@ -259,12 +267,6 @@ <h2 class="no-toc">Recent WebGL Extension Revisions</h2>
<li>
<a href="OES_vertex_array_object/">OES_vertex_array_object</a> : revision 7 on <time>October 16, 2012</time><ul><li>Based on feedback on public_webgl, moved from draft to community approved, and removed aliases.</li></ul>
</li>
-<li>
-<a href="OES_element_index_uint/">OES_element_index_uint</a> : revision 4 on <time>October 16, 2012</time><ul><li>Based on feedback on public_webgl, moved from draft to community approved, and removed aliases.</li></ul>
-</li>
-<li>
-<a href="OES_vertex_array_object/">OES_vertex_array_object</a> : revision 6 on <time>September 24, 2012</time><ul><li>Added resolution to deleted buffer issue</li></ul>
-</li>
</ol>
<img src="../resources/feed-icon-14x14.png" width="14" height="14"> <a href="index.atom">Recent Revisions</a>
</body>
View
569 extensions/proposals/WEBGL_dynamic_texture/DynamicTexture.html
@@ -0,0 +1,569 @@
+<!DOCTYPE html>
+<!-- Questions to answer
+
+Q: Do videos with variable framerate have a target display rate?
+A: No such thing is exposed in the HTMLVideoElement or MediaElement interfaces.
+ The containers usually store the framerate as metadata (in WebM FrameRate
+ is listed as "information only."). However browsers may not use that.
+ Firefox 4, WebKit and Opera all reportedly use the presentation time
+ encoded with the frame.
+ See this thread:
+ http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-January/029801.html
+ The thread starts at
+ http://lists.whatwg.org/pipermail/whatwg-whatwg.org/2011-January/029724.html
+ There is no resolution to the request for a way to determine fps.
+
+ WebM container spec: http://www.webmproject.org/code/specs/container/
+
+Q: What do applications need to be able to determine about the source?
+A: Two things
+ - the minimum interframe interval, which is probably the same as the
+ framerate given in the container. This is to determine a rendering
+ budget. Need to ensure methodology works with fixed- and variable-
+ frame-rate videos.
+ - whether a frame has been missed. In EGLStream this can be determined
+ by comparing the PRODUCER_FRAME_KHR and CONSUMER_FRAME_KHR attributes.
+
+Q: Should we make connection setup a convenience function with an onload
+ handler callback?
+A: TBD
+
+Q: Use an exponential moving average for calculating latency?
+A: TBD.
+
+Q: What should be the interface for connecting a stream to a producer?
+A: KHR_stream_producer_aldatalocator has the app pass an XADataSink
+ structure with, essentially, a pointer to the EGLStream, as the
+ ImageVideoSnk argument when calling CreateMediaPlayer.
+
+ Similarly the stream is connected to an EGLSurface producer by
+ eglCreateStreamProducerSurfaceKHR(dpy, config, EGLStreamKHR stream, &attrib_list[0]);
+
+ This suggests the stream needs to be passed when creating the video element.
+ But video elements do not have a constructor.
+
+Q: Is the maximum latency set when the producer is bound?
+A: Yes.
+
+Q: Do we specify repeat vs pause for the case where latency drops? If so, how?
+A: TBD.
+-->
+<!--
+/*
+ * WEBGL_dynamic_texture sample
+ *
+ * Copyright (C) 2012 HI Corporation. All Rights Reserved.
+ *
+ * Based on
+ * https://cvs.khronos.org/svn/repos/registry/trunk/public/webgl/sdk/demos/webkit/SpiritBox.html
+ * which carries the following license which propagates to this sample:
+ *
+ * Copyright (C) 2009 Apple Inc. All Rights Reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND HI CORPORATION ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
+ * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
+ * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
+ * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
+ * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+ * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+ -->
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<title>WEBGL_dynamic_texture Sample</title>
+<style>
+body, html {
+ margin: 0px;
+ width: 100%;
+ height: 100%;
+}
+#framerate {
+ position: absolute;
+ top: 10px;
+ left: 10px;
+ background-color: rgba(0,0,0,0.3);
+ padding: 1em;
+ color: white;
+}
+#example {
+ width: 100%;
+ height: 100%;
+}
+canvas {
+ display: block;
+ border: thick ridge MediumSlateBlue;
+ -moz-box-sizing: border-box;
+ box-sizing: border-box;
+}
+</style>
+
+<!-- For {request,cancel}AnimFrame -->
+<script src="https://www.khronos.org/registry/webgl/sdk/demos/common/webgl-utils.js"></script>
+<!-- For lost context simulation -->
+<script src="https://www.khronos.org/registry/webgl/sdk/debug/webgl-debug.js"></script>
+<!-- For simpleSetup & makeBox -->
+<script src="https://www.khronos.org/registry/webgl/sdk/demos/webkit/resources/J3DI.js"> </script>
+<!-- For matrix math -->
+<script src="https://www.khronos.org/registry/webgl/sdk/demos/webkit/resources/J3DIMath.js"> </script>
+
+<script id="vshader" type="x-shader/x-vertex">
+ uniform mat4 u_modelViewProjMatrix;
+ uniform mat4 u_normalMatrix;
+ uniform vec3 lightDir;
+
+ attribute vec3 vNormal;
+ attribute vec4 vTexCoord;
+ attribute vec4 vPosition;
+
+ varying float v_Dot;
+ varying vec2 v_texCoord;
+
+ void main()
+ {
+ gl_Position = u_modelViewProjMatrix * vPosition;
+ v_texCoord = vTexCoord.st;
+ vec4 transNormal = u_normalMatrix * vec4(vNormal, 1);
+ v_Dot = max(dot(transNormal.xyz, lightDir), 0.0);
+ }
+</script>
+
+<script id="fshader" type="x-shader/x-fragment">
+ #extension OES_EGL_image_external : enable
+ precision mediump float;
+
+ uniform samplerExternalOES videoSampler;
+
+ varying float v_Dot;
+ varying vec2 v_texCoord;
+
+ void main()
+ {
+ vec2 texCoord = vec2(v_texCoord.s, 1.0 - v_texCoord.t);
+ vec4 color = texture2D(videoSampler, texCoord);
+ color += vec4(0.1, 0.1, 0.1, 1);
+ gl_FragColor = vec4(color.xyz * v_Dot, color.a);
+ }
+</script>
+
+<script>
+ // Use object for "global" variables to avoid polluting the global space.
+ var g = {};
+
+ ///////////////////////////////////////////////////////////////////////
+ // Create a video texture and bind a source to it.
+ ///////////////////////////////////////////////////////////////////////
+
+ // Array of files currently loading
+ g.loadingFiles = [];
+
+ // Clears all the files currently loading.
+ // This is used to handle context lost events.
+ function clearLoadingFiles() {
+ for (var ii = 0; ii < g.loadingFiles.length; ++ii) {
+ g.loadingFiles[ii].onload = undefined;
+ g.loadingFiles[ii].wssDisconnectStream();
+ }
+ g.loadingFiles = [];
+ }
+
+ // Create a hidden video element and append to the document
+ // XXX Is it necessary to append the element?
+ function createVideoElement() {
+ var video = document.createElement('video');
+ video.autoplay = true;
+ video.controls = false;
+ video.hidden = true;
+ document.body.appendChild(video);
+ return video;
+ }
+
+
+ //
+ // connectVideo
+ //
+ // Connect video from the passed HTMLVideoElement to the texture
+ // currently bound to TEXTURE_EXTERNAL_OES on the active texture
+ // unit.
+ //
+ // First a wdtStream object is created with its consumer set to
+ // the texture. Once the video is loaded, it is set as the
+ // producer. This could potentially fail, depending on the
+ // video format.
+ //
+ // interface wdtStream {
+ // enum state {
+ // // Consumer connected; waiting for producer to connect
+ // wdtStreamConnecting,
+ // // Producer & consumer connected. No frames yet. */
+ // wdtStreamEmpty,
+ // wdtStreamNewFrameAvailable,
+ // wdtStreamOldFrameAvailable,
+ // wdtStreamDisconnected
+ // };
+ // // Time taken from acquireImage to posting drawing buffer; default 0?
+ // readonly int consumerLatency; // microseconds
+ // // Frame # (aka Media Stream Count) of most recently inserted frame
+ // // Value is 1 at first frame.
+ // readonly int producerFrame;
+ // // MSC of most recently acquired frame.
+ // readonly int consumerFrame;
+ // // timeout for acquireImage; default 0
+ // int acquireTimeout; // microseconds
+ //
+ // // Sets consumerLatency. Clamp to some maximum set by the
+ // // producer?
+ // void setConsumerLatency(int);
+ // };
+ //
+
+ function connectStreamToProducerAndSource(stream, video, url) {
+ video.onload = function() {
+ g.loadingFiles.splice(g.loadingFiles.indexOf(video), 1);
+ };
+ video.onerror = function() {
+ g.loadingFiles.splice(g.loadingFiles.indexOf(video), 1);
+ // Notify user? Abort application?
+ // video.error gives the reason.
+ };
+ g.loadingFiles.push(video);
+ video.wssConnectToSourceAsProducer(url, stream);
+ }
+
+ function connectVideo(ctx, video) {
+ // Is this whole thing racy? Is the video already loading
+ // when this is called?
+ g.loadingFiles.push(video);
+ g.videoReady = false;
+
+ //-----------------------------
+ // Options for connecting to video
+ //-----------------------------
+ // OPTION 1: method on WDT extension augments video element
+ // with a wdtStream object.
+ ctx.dte.createStream(video);
+ assert(video.wdtStream.state == wdtStreamConnecting);
+ //-----------------------------
+ // OPTION 2: method returns a stream object.
+ g.vstream = ctx.dte.createStream(ctx);
+ assert(g.vstream.state == wdtStreamConnecting);
+ //-----------------------------
+
+ video.onload = function() {
+ g.loadingFiles.splice(g.loadingFiles.indexOf(video), 1);
+ try {
+ // OPTION 1: video object augmented with stream
+ video.wdtStream.connect();
+ assert(video.wdtStream.state == wdtStreamEmpty);
+ //-----------------------------
+ // OPTION 2: separate stream object
+ g.vstream.connectProducer(video);
+ assert(g.stream.state == wdtStreamEmpty);
+ //------------------------------
+ if (!video.autoplay) {
+ video.play(); // Play video
+ }
+ g.videoReady = true;
+ } catch (e) {
+ window.alert("Video texture setup failed: " + e.name);
+ }
+ };
+ }
+
+ ///////////////////////////////////////////////////////////////////////
+ // Initialize the application.
+ ///////////////////////////////////////////////////////////////////////
+
+ function init() {
+ // Initialize
+ var gl = initWebGL(
+ // The id of the Canvas Element
+ "example");
+ if (!gl) {
+ return;
+ }
+ gl.dte = gl.getExtension("WEBGL_dynamic_texture");
+ var program = simpleSetup(
+ gl,
+ // The ids of the vertex and fragment shaders
+ "vshader", "fshader",
+ // The vertex attribute names used by the shaders.
+ // The order they appear here corresponds to their index
+ // used later.
+ [ "vNormal", "vColor", "vPosition"],
+ // The clear color and depth values
+ [ 0.259, 0.388, 1, 1 ], 10000);
+
+ g.videoTexture = {
+ texture: gl.createTexture(),
+ video: createVideoElement(),
+ stream: null
+ };
+ // gl.activeTexture(gl.TEXTURE0);
+ gl.bindTexture(gl.TEXTURE_EXTERNAL_OES, g.videoTexture.texture);
+ // Create stream with currently bound texture as consumer.
+ g.videoTexture.stream = gl.dte.createStream();
+
+ connectStreamToProducerAndSource(stream, video, "http://myserver/myvideo.mp4");
+//-------------
+ // Option 1: video object is augmented with stream
+ connectVideoStream(gl, g.videoTexture.video, "http://myserver/myvideo.mp4");
+ // Option 2: returns stream object
+ g.videoTexture.vstream = connectVideoStream(gl, "http://myserver/myvideo.mp4");
+ connectVideoStream(gl, g.videoTexture, "http://myserver/myvideo.mp4"); //??
+//-------------
+
+ // Set some uniform variables for the shaders
+ gl.uniform3f(gl.getUniformLocation(program, "lightDir"), 0, 0, 1);
+ // video texture is bound to TEXTURE0.
+ gl.uniform1i(gl.getUniformLocation(program, "videoSampler"), 0);
+
+ // Create a box. On return 'gl' contains a 'box' property with
+ // the BufferObjects containing the arrays for vertices,
+ // normals, texture coords, and indices.
+ g.box = makeBox(gl);
+
+ // Create some matrices to use later and save their locations in the shaders
+ g.mvMatrix = new J3DIMatrix4();
+ g.u_normalMatrixLoc = gl.getUniformLocation(program, "u_normalMatrix");
+ g.normalMatrix = new J3DIMatrix4();
+ g.u_modelViewProjMatrixLoc =
+ gl.getUniformLocation(program, "u_modelViewProjMatrix");
+ g.mvpMatrix = new J3DIMatrix4();
+
+ // Enable all of the vertex attribute arrays.
+ gl.enableVertexAttribArray(0);
+ gl.enableVertexAttribArray(1);
+ gl.enableVertexAttribArray(2);
+
+ // Set up all the vertex attributes for vertices, normals and texCoords
+ gl.bindBuffer(gl.ARRAY_BUFFER, g.box.vertexObject);
+ gl.vertexAttribPointer(2, 3, gl.FLOAT, false, 0, 0);
+
+ gl.bindBuffer(gl.ARRAY_BUFFER, g.box.normalObject);
+ gl.vertexAttribPointer(0, 3, gl.FLOAT, false, 0, 0);
+
+ gl.bindBuffer(gl.ARRAY_BUFFER, g.box.texCoordObject);
+ gl.vertexAttribPointer(1, 2, gl.FLOAT, false, 0, 0);
+
+ // Bind the index array
+ gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, g.box.indexObject);
+
+ return gl;
+ }
+
+ function reshape(gl) {
+ // change the size of the canvas's backing store to match the size it is displayed.
+ var canvas = document.getElementById('example');
+ var devicePixelRatio = window.devicePixelRatio || 1;
+ var clientWidthDP = canvas.clientWidth * devicePixelRatio;
+ var clientHeightDP = canvas.clientHeight * devicePixelRatio;
+ if (clientWidthDP == canvas.width && clientHeightDP == canvas.height)
+ return;
+
+ canvas.width = clientWidthDP;
+ canvas.height = clientHeightDP;
+
+ // Set the viewport and projection matrix for the scene
+ gl.viewport(0, 0, clientWidthDP, clientHeightDP);
+ g.perspectiveMatrix = new J3DIMatrix4();
+ g.perspectiveMatrix.perspective(30, clientWidthDP / clientHeightDP, 1, 10000);
+ g.perspectiveMatrix.lookat(0, 0, 7, 0, 0, 0, 0, 1, 0);
+ }
+
+ function drawFrame(gl) {
+ var lastFrame;
+ var syncValues;
+ var latency;
+ var graphicsMSCBase;
+
+ // Make sure the canvas is sized correctly.
+ reshape(gl);
+
+ // Clear the canvas
+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);
+
+ // Make a model/view matrix.
+ g.mvMatrix.makeIdentity();
+ g.mvMatrix.rotate(20, 1,0,0);
+ g.mvMatrix.rotate(currentAngle, 0,1,0);
+
+ // Construct the normal matrix from the model-view matrix and pass it in
+ g.normalMatrix.load(g.mvMatrix);
+ g.normalMatrix.invert();
+ g.normalMatrix.transpose();
+ g.normalMatrix.setUniform(gl, g.u_normalMatrixLoc, false);
+
+ // Construct the model-view * projection matrix and pass it in
+ g.mvpMatrix.load(g.perspectiveMatrix);
+ g.mvpMatrix.multiply(g.mvMatrix);
+ g.mvpMatrix.setUniform(gl, g.u_modelViewProjMatrixLoc, false);
+
+ // To avoid duplicating everything below for each option, use a
+ // temporary variable. This will not be necessary in the final
+ // code.
+ // OPTION 1: augmented video object
+ var vstream = g.video.wdtStream;
+ // OPTION 2: separate stream object
+ var vstream = g.vstream;
+
+ // In the following
+ // UST is a monotonically increasing counter never adjusted by NTP etc.
+ // The unit is nanoseconds but the frequency of update will vary from
+ // system to system. The average frequency at which the counter is
+ // updated should be 5x the highest MSC frequency supported. For
+ // example if highest MSC is 48kHz (audio) the update frequency
+ // should be 240kHz. Most OSes have this kind of counter available.
+ //
+ // If OS provided UST=0 would be system startup. Could also use
+ // {navigation,fetch}Start as in the high-resolution time spec.
+ //
+ // MSC is the media stream count. It is incremented once/sample; for
+ // video that means once/frame, for audio once/sample. For graphics,
+ // it is incremented once/screen refresh.
+ //
+ // CPC is the canvas presentation count. It is incremented once
+ // each time the canvas is presented.
+ //
+
+ if (graphicsMSCBase == undefined) {
+ graphicsMSCBase = gl.dte.getSyncValues().msc;
+ }
+
+ if (lastFrame.msc && vstream.producerFrame > lastFrame.msc + 1) {
+ // Missed a frame! Simplify rendering?
+ }
+
+ if (!latency.frameCount) {
+ // Initialize
+ latency.frameCount = 0;
+ latency.accumTotal = 0;
+ }
+
+ if (lastFrame.ust) {
+ syncValues = gl.dte.getSyncValues();
+ // interface syncValues {
+ // // UST of last present
+ // readonly attribute long long ust;
+ // // Screen refresh count (aka MSC) at last present
+ // // Initialized to 0 on browser start
+ // readonly attribute long msc;
+ // // Canvas presentation count at last present
+ // // Initialized to 0 at canvas creation.
+ // readonly attribute long cpc;
+ // };
+ // XXX What happens to cpc when switch to another tab?
+ if (syncValues.msc - graphicsMSCBase != syncValues.cpc) {
+ // We are not keeping up with screen refresh!
+ // Or are we? If cpc increment stops when canvas hidden,
+ // will need some way to know canvas was hidden so app
+ // won't just assume its not keeping up and therefore
+ // adjust its rendering.
+ graphicsMSCBase = syncValues.msc; // reset base.
+ }
+ latency.accumValue += syncValues.ust - lastFrame.ust;
+ latency.frameCount++;
+ if (latency.frameCount == 30) {
+ vstream.setConsumerLatency(latency.accumValue / 30);
+ latency.frameCount = 0;
+ latency.accumValue = 0;
+ }
+ }
+
+ if (g.videoReady) {
+ if (g.video.wdtStream.acquireImage()) {
+ // Record UST of frame acquisition.
+ // No such system function in JS so it is added to extension.
+ lastFrame.ust = gl.dte.ustnow();
+ // Or possibly
+ lastFrame.ust = window.performance.now();
+ // but there are issues.
+ // - it doesn't meet the requirements listed above but is it sufficient?
+ // - the units are milliseconds but microsecond accuracy is
+ // (nominally) required. Presumably it is supposed to report
+ // fractional values.
+ // The above timer comes from the high-resolution time proposal
+ //
+ lastFrame.msc = vstream.consumerFrame;
+ }
+ vstream.acquireImage();
+ lastFrame.msc = g.stream.consumerFrame;
+ }
+
+ // Draw the cube
+ gl.drawElements(gl.TRIANGLES, g.box.numIndices, gl.UNSIGNED_BYTE, 0);
+
+ if (g.videoReady)
+ vtream.releaseImage();
+
+ // Show the framerate
+ framerate.snapshot();
+
+ currentAngle += incAngle;
+ if (currentAngle > 360)
+ currentAngle -= 360;
+ }
+
+ function start() {
+ var c = document.getElementById("example");
+
+ //c = WebGLDebugUtils.makeLostContextSimulatingCanvas(c);
+ // tell the simulator when to lose context.
+ //c.loseContextInNCalls(20);
+
+ c.addEventListener('webglcontextlost', handleContextLost, false);
+ c.addEventListener('webglcontextrestored', handleContextRestored, false);
+
+ var gl = init();
+ if (!gl) {
+ return;
+ }
+
+ currentAngle = 0;
+ incAngle = 0.5;
+ framerate = new Framerate("framerate");
+ var f = function() {
+ drawFrame(gl);
+ g.requestId = window.requestAnimFrame(f, c);
+ };
+ f();
+
+ function handleContextLost(e) {
+ e.preventDefault();
+ clearLoadingFiles();
+ if (g.requestId !== undefined) {
+ window.cancelAnimFrame(g.requestId);
+ g.requestId = undefined;
+ }
+ }
+
+ function handleContextRestored() {
+ init();
+ f();
+ }
+ }
+</script>
+</head>
+
+<body onload="start()">
+<canvas id="example">
+ If you're seeing this your web browser doesn't support the &lt;canvas>&gt; element. Ouch!
+</canvas>
+<div id="framerate"></div>
+</body>
+
+</html>
View
33 extensions/proposals/WEBGL_dynamic_texture/extension.xml
@@ -13,7 +13,7 @@
<contributor>Ken Russell, Google</contributor>
- <contributor>David Sheets</contributor>
+ <contributor>David Sheets, Ashima Arts</contributor>
<contributor>William Hennebois, STMicroelectronics</contributor>
@@ -788,6 +788,9 @@ void dynamicTextureSetSource(HTMLVideoElement? source);</pre>connect the
&lt;/body&gt;
&lt;/html&gt;</pre></div>
+
+ <p>See the <a href="DynamicTexture.html" target="_blank">complete
+ sample</a>.</p>
</samplecode>
<tests/>
@@ -927,6 +930,34 @@ void dynamicTextureSetSource(HTMLVideoElement? source);</pre>connect the
exposed to support CanvasRenderingContext2D.drawImage. The HTMLElement
is simply passed to drawImage.</p>
</li>
+
+ <li>
+ <p>Should <a
+ href="http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/HighResolutionTime/Overview.html#sec-DOMHighResTimeStamp">DOMHighResolutionTime</a>
+ and <code>window.performance.now()</code> from the W3C <a
+ href="http://dvcs.w3.org/hg/webperf/raw-file/tip/specs/HighResolutionTime/Overview.html">High-Resolution
+ Time</a> draft be used for the timestamps and as UST?</p>
+
+ <p>UNRESOLVED: The specified unit is milliseconds which means using
+ fractional <code>double</code> values to represent smaller times with
+ the attendant issues of variable time steps and inaccuracies. As
+ currently specified, with browsers allowed to be as sloppy as 1ms
+ accuracy, <code>window.performance.now()</code> is insufficiently
+ accurate. Feedback has been provided. Hopefully the draft
+ specification will be updated.</p>
+ </li>
+
+ <li>
+ <p>Should UST 0 be system start-up, browser start-up or <a
+ href="http://www.w3.org/TR/navigation-timing/#dom-performancetiming-navigationstart">navigationStart</a>
+ as defined in the W3C <a
+ href="http://www.w3.org/TR/2012/PR-navigation-timing-20120726/">Navigation
+ Timing</a> proposed recommendation?</p>
+
+ <p>UNRESOLVED: If high-resolution time is used, then navigationStart
+ makes sense otherwise browser start-up seems preferable to system
+ start-up as it is closer to the events being measured.</p>
+ </li>
</ol>
</issues>
View
19 extensions/proposals/WEBGL_dynamic_texture/index.html
@@ -233,7 +233,7 @@ <h2 class="no-toc">IP Status</h2>No known IP claims.<h2 class="no-toc">New Funct
latching an image and displaying it. Setting the latency enables the
HTMLVideoElement to make necessary adjustments to keep audio in
sync.</dd>
-<dt class="idl-code">int dynamicTextureGetConsumerLatencyUsec()</dt>
+<dt class="idl-code">int dynamicTextureSetConsumerLatencyUsec()</dt>
<dd>Returns
the currently set latency.</dd>
</dl>
@@ -380,14 +380,11 @@ <h2 class="no-toc">Additions to the WebGL Specification</h2>
source. The rules for selecting the image to be latched mirror those for
selecting the image drawn by the <code>drawImage</code> method of <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#canvasrenderingcontext2d">CanvasRenderingContext2D</a>.</p>
- <p>For HTMLVideoElements, it latches the frame video that corresponds to
- the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#current-playback-position">current
- playback position</a> of the audio channel, as defined in the <a href="http://www.whatwg.org/specs/web-apps/current-work/">HTML Living
- Standard</a>, <em>latency</em> microseconds from the call, where
- <em>latency</em> is described in <a href="#setlatency">dynamicTextureSetConsumerLatencyUsec</a>, unless the
- element's readyState attribute is either HAVE_NOTHING or HAVE_METADATA,
- in which case the command returns without latching anything and the
- texture remains <em>incomplete</em>.</p>
+ <p>For HTMLVideoElements, it will latch the frame at the <a href="http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#current-playback-position">current
+ playback position</a>, as defined in the <a href="http://www.whatwg.org/specs/web-apps/current-work/">HTML Living
+ Standard</a>, unless the element's readyState attribute is either
+ HAVE_NOTHING or HAVE_METADATA, in which case the command returns without
+ latching anything and the texture remains <em>incomplete</em>.</p>
<p>For animated HTMLImageElements it will latch the first frame of the
animation.</p>
@@ -405,7 +402,7 @@ <h2 class="no-toc">Additions to the WebGL Specification</h2>
image frame since the last call then
<code>dynamicTextureAcquireImage</code> will "latch" the newly inserted
image frame. If the producer has inserted more than one new image frame
- since the last call then all but the most recently inserted image frame
+ since the last call then all but the most recently inserted image frames
are discarded and <code>dynamicTextureAcquireImage</code> will "latch"
the most recently inserted image frame. For HTMLVideoElements, the
application can use the value of the <code>currentTime</code> attribute
@@ -596,7 +593,7 @@ <h2 class="no-toc">Sample Code</h2>
// Load video from the passed HTMLVideoElement id, bind it to a new WebGLTexture object
// and return the WebGLTexture.
//
- // Is there a constructor for an HTMLVideoElement so you can do like "new Image()?"
+ // Is their a constructor for an HTMLVideoElement so you can do like "new Image()?"
//
function createVideoTexture(ctx, videoId)
{
View
26 extensions/registry.xml
@@ -9,24 +9,30 @@
</revision></history></extension><extension href="OES_texture_float/"><name>OES_texture_float</name><number>1</number><history><revision date="2010/11/29" number="1">
<change>Initial revision.</change>
</revision><revision date="2010/12/13" number="2">
- <change>Extended to support pixel type FLOAT for texImage2D and texSubImage2D entry points taking ImageData, HTMLImageElement, HTMLCanvasElement and HTMLVideoElement.
- </change>
+ <change>Extended to support pixel type FLOAT for texImage2D and
+ texSubImage2D entry points taking ImageData, HTMLImageElement,
+ HTMLCanvasElement and HTMLVideoElement. </change>
</revision><revision date="2011/09/12" number="3">
- <change>Added optional ability to use a FLOAT type texture as an FBO's color attachment.
- </change>
+ <change>Added optional ability to use a FLOAT type texture as an FBO's
+ color attachment. </change>
</revision><revision date="2012/01/03" number="4">
<change>Removed webgl module per changes to Web IDL spec.</change>
+ </revision><revision date="2012/12/04" number="5">
+ <change>Specify that implementations supporting FLOAT color attachments
+ implicitly enable WEBGL_color_buffer_float.</change>
</revision></history></extension><extension href="OES_texture_half_float/"><name>OES_texture_half_float</name><number>2</number><history><revision date="2010/11/29" number="1">
<change>Initial revision.</change>
</revision><revision date="2011/09/12" number="2">
- <change>
- Added similar text about <code>texImage2D</code> and <code>texSubImage2D</code> as in OES_texture_float spec.
- </change>
- <change>
- Added optional ability to use a HALF_FLOAT_OES type texture as an FBO's color attachment.
- </change>
+ <change> Added similar text about <code>texImage2D</code> and
+ <code>texSubImage2D</code> as in OES_texture_float spec. </change>
+
+ <change> Added optional ability to use a HALF_FLOAT_OES type texture as
+ an FBO's color attachment. </change>
</revision><revision date="2012/01/03" number="3">
<change>Removed webgl module per changes to Web IDL spec.</change>
+ </revision><revision date="2012/12/04" number="4">
+ <change>Specify that implementations supporting HALF_FLOAT_OES color
+ attachments implicitly enable EXT_color_buffer_half_float.</change>
</revision></history></extension><extension href="OES_vertex_array_object/"><name>OES_vertex_array_object</name><number>5</number><history><revision date="2011/01/27" number="1">
<change>Initial revision.</change>
</revision><revision date="2011/11/12" number="2">
Please sign in to comment.
Something went wrong with that request. Please try again.