diff --git a/specs/latest/2.0/index.html b/specs/latest/2.0/index.html index 17087d6d8..3a0fdd90d 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,9 @@ 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. + +
Renders element to the currently bound WebGLTexture, redefining level 0 of the texture. This function always operates on level 0.
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.
All pixel unpack state is ignored by this function, including the PIXEL_UNPACK_BUFFER binding and all UNPACK_ pixel store parameters.
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 |
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.