You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
undefined texElementImage2D(GLenum target, GLenum internalformat, (Element or ElementImage) element,
948
+
optional WebGLCopyElementImageConfig config = {}); // May throw DOMException
949
+
938
950
undefined uniform1fv(WebGLUniformLocation? location, Float32List data, optional unsigned long long srcOffset = 0,
939
951
optional GLuint srcLength = 0);
940
952
undefined uniform2fv(WebGLUniformLocation? location, Float32List data, optional unsigned long long srcOffset = 0,
@@ -2212,116 +2224,28 @@ <h4>Texture objects</h4>
2212
2224
</dd>
2213
2225
2214
2226
<dtclass="idl-code">
2215
-
[throws] undefined texElementImage2D(GLenum target, GLint level, GLint internalformat, GLenum format, GLenum type, Element element);
2216
-
</dt>
2217
-
<dd>
2218
-
<p>Renders the given element to the currently bound WebGLTexture.</p>
2219
-
<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>
2220
-
<p>TBD: define state of rendering + security. These will be more links to whatwg</p><p></p>
2221
-
<p>If this function is called with an <code>HTMLElement</code> that is not a direct descendant of the <ahref="#context-canvas">canvas</a> of the current context, generates an <code>INVALID_OPERATION</code> error.</p>
2222
-
<p>If a WebGLBuffer is bound to the <code>PIXEL_UNPACK_BUFFER</code> target, generates an <code>INVALID_OPERATION</code> error.</p>
2223
-
<p>The combination of <em>internalformat</em>, <em>format</em>, and <em>type</em> must be listed in the following table:</p>
If <ahref="#PIXEL_STORE_PARAM_CONSTRAINTS">pixel store parameter constraints</a> are not met,
2235
-
generates an <code>INVALID_OPERATION</code> error.
2236
-
</p>
2237
-
</dd>
2238
-
2239
-
<dtclass="idl-code">
2240
-
[throws] undefined texElementImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, Element element);
2241
-
</dt>
2242
-
<dd>
2243
-
<p>Renders the given element to the currently bound WebGLTexture.</p>
2244
-
<p>The width and height of the texture are set by the passed in width and height.</p>
2245
-
<p>TBD: define state of rendering + security. These will be more links to whatwg</p><p></p>
2246
-
<p>If this function is called with an <code>HTMLElement</code> that is not a direct descendant of the <ahref="#context-canvas">canvas</a> of the current context, generates an <code>INVALID_OPERATION</code> error.</p>
2247
-
<p>If a WebGLBuffer is bound to the <code>PIXEL_UNPACK_BUFFER</code> target, generates an <code>INVALID_OPERATION</code> error.</p>
2248
-
<p>The combination of <em>internalformat</em>, <em>format</em>, and <em>type</em> must be listed in the following table:</p>
<p>Renders the given element to the currently bound WebGLTexture.</p>
2269
-
<p>sx, sy, swidth and sheight define a rectangular slice of the element's borderbox. This slice determines the size of the generated texture.</p>
2270
-
<p>TBD: define state of rendering + security. These will be more links to whatwg</p><p></p>
2271
-
<p>If this function is called with an <code>HTMLElement</code> that is not a direct descendant of the <ahref="#context-canvas">canvas</a> of the current context, generates an <code>INVALID_OPERATION</code> error.</p>
2272
-
<p>If a WebGLBuffer is bound to the <code>PIXEL_UNPACK_BUFFER</code> target, generates an <code>INVALID_OPERATION</code> error.</p>
2273
-
<p>The combination of <em>internalformat</em>, <em>format</em>, and <em>type</em> must be listed in the following table:</p>
<p>Renders the given element to the currently bound WebGLTexture.</p>
2294
-
<p>sx, sy, swidth and sheight define a rectangular slice of the element's when its size is set to the width and height. This slice determines the size of the generated texture.</p>
2295
-
<p>TBD: define state of rendering + security. These will be more links to whatwg</p><p></p>
2296
-
<p>If this function is called with an <code>HTMLElement</code> that is not a direct descendant of the <ahref="#context-canvas">canvas</a> of the current context, generates an <code>INVALID_OPERATION</code> error.</p>
2297
-
<p>If a WebGLBuffer is bound to the <code>PIXEL_UNPACK_BUFFER</code> target, generates an <code>INVALID_OPERATION</code> error.</p>
2298
-
<p>The combination of <em>internalformat</em>, <em>format</em>, and <em>type</em> must be listed in the following table:</p>
<p>Renders <code>element</code> to the currently bound <code>WebGLTexture</code> at level zero.</p>
2232
+
<p>The <code>element</code> argument identifies an <ahref="https://whatpr.org/html/11588/canvas.html#concept-canvas-element-image-snapshots">element image snapshot</a>, as defined by HTML. The HTML algorithms define how element image snapshots are created, updated, retrieved, and filtered for security- or privacy-sensitive information. If <code>element</code> is an <code>Element</code>, the source rendering is the snapshot from the most recent <code>paint</code> event for the <ahref="#context-canvas">canvas</a> of the current context. If <code>element</code> is an <code>ElementImage</code>, the source rendering is that captured snapshot.</p>
2233
+
<p>If this function is called with an <code>Element</code> that is not a direct child of the <ahref="#context-canvas">canvas</a> of the current context in the most recent rendering update, generates an <code>INVALID_OPERATION</code> error.</p>
2234
+
<p>If <code>target</code> is not <code>TEXTURE_2D</code>, generates an <code>INVALID_ENUM</code> error.</p>
2235
+
<p>If no <code>WebGLTexture</code> is bound to <code>target</code>, generates an <code>INVALID_OPERATION</code> error.</p>
2236
+
<p>If a <code>WebGLBuffer</code> is bound to the <code>PIXEL_UNPACK_BUFFER</code> target, generates an <code>INVALID_OPERATION</code> error.</p>
2237
+
<p><code>config.sx</code> and <code>config.sy</code> are in CSS pixels and default to 0. <code>config.swidth</code> and <code>config.sheight</code> are in CSS pixels and default to the source's natural width minus <code>config.sx</code> and natural height minus <code>config.sy</code>, respectively. Together, these members define the source rectangle of the element image snapshot to render.</p>
2238
+
<p><code>config.width</code> and <code>config.height</code> are in texels and define the generated texture size. If omitted, each dimension defaults to the source rectangle size scaled by the inverse of the canvas-grid-to-CSS scaling factor used to produce the element image snapshot.</p>
2239
+
<p>The <code>internalformat</code> argument must be one of the values in the following table. Each value has an implied source format of <code>RGBA</code> and the listed implied source type:</p>
<p>Renders the given element to the currently bound WebGLTexture.</p>
2320
-
<p>The texture is resized to <code>width</code> and <code>height</code>>. Add links to whatwg.</p>
2321
-
<p>TBD: define state of rendering + security. These will be more links to whatwg</p><p></p>
2322
-
<p>If this function is called with an <code>HTMLElement</code> that is not a direct descendant of the <ahref="#context-canvas">canvas</a> of the current context, generates an <code>INVALID_OPERATION</code> error.</p>
2323
-
<p>If a WebGLBuffer is bound to the <code>PIXEL_UNPACK_BUFFER</code> target, generates an <code>INVALID_OPERATION</code> error.</p>
2324
-
<p>See <ahref="../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>
2247
+
<p>If <code>internalformat</code> is not listed in the table above, generates an <code>INVALID_ENUM</code> error.</p>
2248
+
<p>If any supplied numeric member of <code>config</code> is negative, or if the computed source rectangle width, source rectangle height, texture width, or texture height is not positive, generates an <code>INVALID_VALUE</code> error.</p>
2325
2249
<p>
2326
2250
If <ahref="#PIXEL_STORE_PARAM_CONSTRAINTS">pixel store parameter constraints</a> are not met,
2327
2251
generates an <code>INVALID_OPERATION</code> error.
0 commit comments