diff --git a/specs/latest/2.0/index.html b/specs/latest/2.0/index.html index 17087d6d8..1e19baa6c 100644 --- a/specs/latest/2.0/index.html +++ b/specs/latest/2.0/index.html @@ -266,6 +266,15 @@
typedef long long GLint64;
typedef unsigned long long GLuint64;
+
+dictionary WebGLCopyElementImageConfig {
+ GLfloat sx;
+ GLfloat sy;
+ GLfloat swidth;
+ GLfloat sheight;
+ GLsizei width;
+ GLsizei height;
+};
@@ -935,6 +944,10 @@ offset is the byte offset into the WebGLBuffer's data store; generates an INVALID_VALUE error if it's less than 0.
The ETC2 and EAC texture formats defined in OpenGL ES 3.0 are not available in WebGL 2.0. + +
The level argument identifies the mipmap level of the texture object bound to target to redefine.
The element argument identifies an element image snapshot, 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 element is an Element, the source rendering is the snapshot from the most recent paint event for the canvas of the current context. If element is an ElementImage, the source rendering is that captured snapshot.
If this function is called with an Element that is not a direct child of the canvas of the current context in the most recent rendering update, generates an INVALID_OPERATION error.
If target is not TEXTURE_2D, generates an INVALID_ENUM error.
If no WebGLTexture is bound to target, generates an INVALID_OPERATION error.
If a WebGLBuffer is bound to the PIXEL_UNPACK_BUFFER target, generates an INVALID_OPERATION error.
All UNPACK_ pixel store parameters are ignored by this function.
If config.sx, config.sy, config.swidth, and config.sheight are all supplied, they define the source rectangle of the element image snapshot to render, in CSS pixels. If none of them are supplied, the source rectangle has sx and sy of 0, swidth equal to the source's natural width, and sheight equal to the source's natural height. If only some of them are supplied, generates an INVALID_VALUE error.
If config.width and config.height are both supplied, they define the generated texture size, in texels. If neither member is supplied, the texture width and height default to the source rectangle size scaled by the inverse of the canvas-grid-to-CSS scaling factor used to produce the element image snapshot. If only one of them is supplied, generates an INVALID_VALUE error.
The internalformat argument must be one of the values in the following table. Each value has an implied source format of RGBA and the listed implied source type:
| Internal Format | Implied Source Type |
|---|---|
| RGBA8 | UNSIGNED_BYTE |
| SRGB8_ALPHA8 | UNSIGNED_BYTE |
| RGBA16F | HALF_FLOAT |
| RGBA32F | FLOAT |
The RGBA source values produced by rendering the element image snapshot are computed independently of internalformat. In particular, when internalformat is RGBA8 or SRGB8_ALPHA8, the generated UNSIGNED_BYTE source values are identical; the choice between those formats only affects the texture's storage and subsequent sampling behavior.
If internalformat is not listed in the table above, generates an INVALID_ENUM error.
If any supplied numeric member of config is negative, or if the computed source rectangle width, source rectangle height, texture width, or texture height is not positive, generates an INVALID_VALUE error.