Skip to content

Commit 948dc72

Browse files
committed
Add missing definitions of texElementImage2D
1 parent c16ae72 commit 948dc72

2 files changed

Lines changed: 81 additions & 3 deletions

File tree

specs/latest/2.0/index.html

Lines changed: 76 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2212,8 +2212,7 @@ <h4>Texture objects</h4>
22122212
</dd>
22132213

22142214
<dt class="idl-code">
2215-
[throws] undefined texElementImage2D(GLenum target, GLint level, GLint internalformat, GLenum format, GLenum type,
2216-
Element element);
2215+
[throws] undefined texElementImage2D(GLenum target, GLint level, GLint internalformat, GLenum format, GLenum type, Element element);
22172216
</dt>
22182217
<dd>
22192218
<p>Renders the given element to the currently bound WebGLTexture.</p>
@@ -2237,6 +2236,81 @@ <h4>Texture objects</h4>
22372236
</p>
22382237
</dd>
22392238

2239+
<dt class="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 <a href="#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>
2249+
<table id="TEXTURE_TYPES_FORMATS_FROM_DOM_ELEMENTS_TABLE_2">
2250+
<tr><th>Internal Format</th><th>Format</th><th>Type</th></tr>
2251+
<tr><td>RGB</td><td>RGB</td><td>UNSIGNED_BYTE</td></tr>
2252+
<tr><td>RGBA</td><td>RGBA</td><td>UNSIGNED_BYTE</td></tr>
2253+
<tr><td>RGB16F</td><td>RGB</td><td>HALF_FLOAT<br>FLOAT</td></tr>
2254+
<tr><td>RGB32F</td><td>RGB</td><td>FLOAT</td></tr>
2255+
<tr><td>RGBA16F</td><td>RGBA</td><td>HALF_FLOAT<br>FLOAT</td></tr>
2256+
<tr><td>RGBA32F</td><td>RGBA</td><td>FLOAT</td></tr>
2257+
</table>
2258+
<p>
2259+
If <a href="#PIXEL_STORE_PARAM_CONSTRAINTS">pixel store parameter constraints</a> are not met,
2260+
generates an <code>INVALID_OPERATION</code> error.
2261+
</p>
2262+
</dd>
2263+
2264+
<dt class="idl-code">
2265+
[throws] undefined texElementImage2D(GLenum target, GLint level, GLint internalformat, GLfloat sx, GLfloat sy, GLfloat swidth, GLfloat sheight, GLenum format, GLenum type, Element element)
2266+
</dt>
2267+
<dd>
2268+
<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 <a href="#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>
2274+
<table id="TEXTURE_TYPES_FORMATS_FROM_DOM_ELEMENTS_TABLE_2">
2275+
<tr><th>Internal Format</th><th>Format</th><th>Type</th></tr>
2276+
<tr><td>RGB</td><td>RGB</td><td>UNSIGNED_BYTE</td></tr>
2277+
<tr><td>RGBA</td><td>RGBA</td><td>UNSIGNED_BYTE</td></tr>
2278+
<tr><td>RGB16F</td><td>RGB</td><td>HALF_FLOAT<br>FLOAT</td></tr>
2279+
<tr><td>RGB32F</td><td>RGB</td><td>FLOAT</td></tr>
2280+
<tr><td>RGBA16F</td><td>RGBA</td><td>HALF_FLOAT<br>FLOAT</td></tr>
2281+
<tr><td>RGBA32F</td><td>RGBA</td><td>FLOAT</td></tr>
2282+
</table>
2283+
<p>
2284+
If <a href="#PIXEL_STORE_PARAM_CONSTRAINTS">pixel store parameter constraints</a> are not met,
2285+
generates an <code>INVALID_OPERATION</code> error.
2286+
</p>
2287+
</dd>
2288+
2289+
<dt class="idl-code">
2290+
[throws] undefined texElementImage2D(GLenum target, GLint level, GLint internalformat, GLfloat sx, GLfloat sy, GLfloat swidth, GLfloat sheight, GLsizei width, GLsizei height, GLenum format, GLenum type, Element element)
2291+
</dt>
2292+
<dd>
2293+
<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 <a href="#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>
2299+
<table id="TEXTURE_TYPES_FORMATS_FROM_DOM_ELEMENTS_TABLE_2">
2300+
<tr><th>Internal Format</th><th>Format</th><th>Type</th></tr>
2301+
<tr><td>RGB</td><td>RGB</td><td>UNSIGNED_BYTE</td></tr>
2302+
<tr><td>RGBA</td><td>RGBA</td><td>UNSIGNED_BYTE</td></tr>
2303+
<tr><td>RGB16F</td><td>RGB</td><td>HALF_FLOAT<br>FLOAT</td></tr>
2304+
<tr><td>RGB32F</td><td>RGB</td><td>FLOAT</td></tr>
2305+
<tr><td>RGBA16F</td><td>RGBA</td><td>HALF_FLOAT<br>FLOAT</td></tr>
2306+
<tr><td>RGBA32F</td><td>RGBA</td><td>FLOAT</td></tr>
2307+
</table>
2308+
<p>
2309+
If <a href="#PIXEL_STORE_PARAM_CONSTRAINTS">pixel store parameter constraints</a> are not met,
2310+
generates an <code>INVALID_OPERATION</code> error.
2311+
</p>
2312+
</dd>
2313+
22402314
<dt class="idl-code">
22412315
[throws] undefined texElementImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
22422316
GLenum format, GLenum type, Element element);

specs/latest/2.0/webgl2.idl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -562,6 +562,11 @@ interface mixin WebGL2RenderingContextOverloads
562562
Element element);
563563
undefined texElementImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height,
564564
GLenum format, GLenum type, Element element);
565+
undefined texElementImage2D(GLenum target, GLint level, GLint internalformat, GLfloat sx, GLfloat sy,
566+
GLfloat swidth, GLfloat sheight, GLenum format, GLenum type, Element element);
567+
undefined texElementImage2D(GLenum target, GLint level, GLint internalformat, GLfloat sx, GLfloat sy,
568+
GLfloat swidth, GLfloat sheight, GLsizei width, GLsizei height, GLenum format,
569+
GLenum type, Element element);
565570

566571
undefined uniform1fv(WebGLUniformLocation? location, Float32List data, optional unsigned long long srcOffset = 0,
567572
optional GLuint srcLength = 0);
@@ -606,4 +611,3 @@ interface WebGL2RenderingContext
606611
WebGL2RenderingContext includes WebGLRenderingContextBase;
607612
WebGL2RenderingContext includes WebGL2RenderingContextBase;
608613
WebGL2RenderingContext includes WebGL2RenderingContextOverloads;
609-

0 commit comments

Comments
 (0)