Skip to content

Commit c16ae72

Browse files
committed
add addition texElementImage2D + constraints + address review comments
1 parent 3e411b1 commit c16ae72

File tree

2 files changed

+26
-3
lines changed

2 files changed

+26
-3
lines changed

specs/latest/2.0/index.html

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2217,10 +2217,10 @@ <h4>Texture objects</h4>
22172217
</dt>
22182218
<dd>
22192219
<p>Renders the given element to the currently bound WebGLTexture.</p>
2220-
<p>The width and height of the texture are derived from the CSS width and height of the element at the time of rendering. Add links to whatwg.</p>
2220+
<p>The width and height of the texture are derived from the CSS borderbox of the element at the time of rendering. Add links to whatwg.</p>
22212221
<p>TBD: define state of rendering + security. These will be more links to whatwg</p><p></p>
2222-
<p>If no WebGLBuffer is bound to the <code>PIXEL_PACK_BUFFER</code> target, generates an
2223-
<code>INVALID_OPERATION</code> error.</p>
2222+
<p>If this function is called with an <code>HTMLElement</code> that is not a direct descendant of the <a href="#context-canvas">canvas</a> of the current context, generates an <code>INVALID_OPERATION</code> error.</p>
2223+
<p>If a WebGLBuffer is bound to the <code>PIXEL_UNPACK_BUFFER</code> target, generates an <code>INVALID_OPERATION</code> error.</p>
22242224
<p>The combination of <em>internalformat</em>, <em>format</em>, and <em>type</em> must be listed in the following table:</p>
22252225
<table id="TEXTURE_TYPES_FORMATS_FROM_DOM_ELEMENTS_TABLE_2">
22262226
<tr><th>Internal Format</th><th>Format</th><th>Type</th></tr>
@@ -2231,6 +2231,27 @@ <h4>Texture objects</h4>
22312231
<tr><td>RGBA16F</td><td>RGBA</td><td>HALF_FLOAT<br>FLOAT</td></tr>
22322232
<tr><td>RGBA32F</td><td>RGBA</td><td>FLOAT</td></tr>
22332233
</table>
2234+
<p>
2235+
If <a href="#PIXEL_STORE_PARAM_CONSTRAINTS">pixel store parameter constraints</a> are not met,
2236+
generates an <code>INVALID_OPERATION</code> error.
2237+
</p>
2238+
</dd>
2239+
2240+
<dt class="idl-code">
2241+
[throws] undefined texElementImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
2242+
GLenum format, GLenum type, Element element);
2243+
</dt>
2244+
<dd>
2245+
<p>Renders the given element to the currently bound WebGLTexture.</p>
2246+
<p>The texture is resized to <code>width</code> and <code>height</code>>. Add links to whatwg.</p>
2247+
<p>TBD: define state of rendering + security. These will be more links to whatwg</p><p></p>
2248+
<p>If this function is called with an <code>HTMLElement</code> that is not a direct descendant of the <a href="#context-canvas">canvas</a> of the current context, generates an <code>INVALID_OPERATION</code> error.</p>
2249+
<p>If a WebGLBuffer is bound to the <code>PIXEL_UNPACK_BUFFER</code> target, generates an <code>INVALID_OPERATION</code> error.</p>
2250+
<p>See <a href="../1.0/index.html#TEXTURE_TYPES_FORMATS_FROM_DOM_ELEMENTS_TABLE_2">texElementImage2D</a> for the interpretation of the <em>internalformat</em>, <em>format</em> and <em>type</em> arguments, and notes on the <code>UNPACK_PREMULTIPLY_ALPHA_WEBGL</code> pixel storage parameter. </p>
2251+
<p>
2252+
If <a href="#PIXEL_STORE_PARAM_CONSTRAINTS">pixel store parameter constraints</a> are not met,
2253+
generates an <code>INVALID_OPERATION</code> error.
2254+
</p>
22342255
</dd>
22352256
</dl>
22362257

specs/latest/2.0/webgl2.idl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -560,6 +560,8 @@ interface mixin WebGL2RenderingContextOverloads
560560

561561
undefined texElementImage2D(GLenum target, GLint level, GLint internalformat, GLenum format, GLenum type,
562562
Element element);
563+
undefined texElementImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
564+
GLenum format, GLenum type, Element element);
563565

564566
undefined uniform1fv(WebGLUniformLocation? location, Float32List data, optional unsigned long long srcOffset = 0,
565567
optional GLuint srcLength = 0);

0 commit comments

Comments
 (0)