-
Notifications
You must be signed in to change notification settings - Fork 692
add first prototype of texElementImage2D #3752
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -2210,8 +2210,31 @@ <h4>Texture objects</h4> | |
| <p><em>offset</em> is the byte offset into the WebGLBuffer's data store; generates an <code>INVALID_VALUE</code> error if it's less than 0.</p> | ||
| <p>The ETC2 and EAC texture formats defined in OpenGL ES 3.0 are <a href="#NO_ETC2_EAC">not available in WebGL 2.0</a>. | ||
| </dd> | ||
|
|
||
| <dt class="idl-code"> | ||
| [throws] undefined texElementImage2D(GLenum target, GLint level, GLint internalformat, GLenum format, GLenum type, | ||
| Element element); | ||
| </dt> | ||
| <dd> | ||
| <p>Renders the given element to the currently bound WebGLTexture.</p> | ||
| <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> | ||
| <p>TBD: define state of rendering + security. These will be more links to whatwg</p><p></p> | ||
| <p>If no WebGLBuffer is bound to the <code>PIXEL_PACK_BUFFER</code> target, generates an | ||
| <code>INVALID_OPERATION</code> error.</p> | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This validation related to |
||
| <p>The combination of <em>internalformat</em>, <em>format</em>, and <em>type</em> must be listed in the following table:</p> | ||
| <table id="TEXTURE_TYPES_FORMATS_FROM_DOM_ELEMENTS_TABLE_2"> | ||
| <tr><th>Internal Format</th><th>Format</th><th>Type</th></tr> | ||
| <tr><td>RGB</td><td>RGB</td><td>UNSIGNED_BYTE</td></tr> | ||
| <tr><td>RGBA</td><td>RGBA</td><td>UNSIGNED_BYTE</td></tr> | ||
| <tr><td>RGB16F</td><td>RGB</td><td>HALF_FLOAT<br>FLOAT</td></tr> | ||
| <tr><td>RGB32F</td><td>RGB</td><td>FLOAT</td></tr> | ||
| <tr><td>RGBA16F</td><td>RGBA</td><td>HALF_FLOAT<br>FLOAT</td></tr> | ||
| <tr><td>RGBA32F</td><td>RGBA</td><td>FLOAT</td></tr> | ||
| </table> | ||
| </dd> | ||
| </dl> | ||
|
|
||
|
|
||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please remove extra blank line. |
||
| <!-- ======================================================================================================= --> | ||
|
|
||
| <h4>Programs and Shaders</h4> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The semantics of HTML-in-Canvas have evolved significantly in https://github.com/WICG/html-in-canvas . Now there's a
paintevent which applications should watch for, andtexElementImage2Dcopies in the rendered version of the element at the time of the lastpaintevent. Could you please expand out the text here to describe more precisely what ends up in theWebGLTexture? URL links to the upstream spec would probably be best, to avoid duplicating text.