recursal/MDN huggingface dataset:
WebGL2RenderingContext: texStorage2D() method
=============================================

 The **`WebGL2RenderingContext.texStorage2D()`** method of the
 WebGL API specifies all levels of
 two-dimensional texture storage.

Syntax
------


```js
texStorage2D(target, levels, internalformat, width, height)
```

### Parameters

`target`

 A `GLenum` specifying the binding point (target) of the active texture.
 Possible values:


* `gl.TEXTURE_2D`: A two-dimensional texture.
* `gl.TEXTURE_CUBE_MAP`: A cube-mapped texture.

`levels`

A `GLint` specifying the number of texture levels.

`internalformat`

A `GLenum` specifying the texture store format. Possible values:

* `gl.R8`
* `gl.R16F`
* `gl.R32F`
* `gl.R8UI`
* `gl.RG8`
* `gl.RG16F`
* `gl.RG32F`
* `gl.RG8UI`
* `gl.RGB8`
* `gl.SRGB8`
* `gl.RGB565`
* `gl.R11F_G11F_B10F`
* `gl.RGB9_E5`
* `gl.RGB16F`
* `gl.RGB32F`
* `gl.RGB8UI`
* `gl.RGBA8`
* `gl.SRGB8_ALPHA8`
* `gl.RGB5_A1`
* `gl.RGBA4`
* `gl.RGBA16F`
* `gl.RGBA32F`
* `gl.RGBA8UI`

 Unlike OpenGL 3.0, WebGL 2 **doesn't support** the following ETC2 and
 EAC compressed texture formats (see section 5.37 in the WebGL 2 spec). You might be able to enable them via the
 `WEBGL_compressed_texture_etc` extension, though.


* `gl.COMPRESSED_R11_EAC`
* `gl.COMPRESSED_SIGNED_R11_EAC`
* `gl.COMPRESSED_RG11_EAC`
* `gl.COMPRESSED_SIGNED_RG11_EAC`
* `gl.COMPRESSED_RGB8_ETC2`
* `gl.COMPRESSED_RGBA8_ETC2_EAC`
* `gl.COMPRESSED_SRGB8_ETC2`
* `gl.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC`
* `gl.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2`
* `gl.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2`

`width`

A `GLsizei` specifying the width of the texture.

`height`

A `GLsizei` specifying the height of the texture.

### Return value

None (`undefined`).

Examples
--------


```js
gl.texStorage2D(gl.TEXTURE\_2D, 1, gl.RGB8, 256, 256);
```

Specifications
--------------

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.6 |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `WebGL2RenderingContext.texStorage3D()`
* `WEBGL_compressed_texture_etc`
WebGL2RenderingContext: vertexAttribI4[u]i[v]() method
======================================================

 The **`WebGL2RenderingContext.vertexAttribI4[u]i[v]()`**
 methods of the WebGL 2 API specify integer
 values for generic vertex attributes.

Syntax
------


```js
vertexAttribI4i(index, v0, v1, v2, v3)
vertexAttribI4ui(index, v0, v1, v2, v3)
vertexAttribI4iv(index, value)
vertexAttribI4uiv(index, value)
```

### Parameters

`index`

 A `GLuint` specifying the position of the vertex attribute to be
 modified.


`v0, v1, v2, v3`

An integer `Number` for the vertex attribute value.

`value`

 A `Uint32Array`/`Int32Array` or sequences of
 `GLuint`/ `GLint` for integer vector vertex attribute
 values.


### Return value

None (`undefined`).

Examples
--------


```js
gl.vertexAttribI4i(a_foobar, 10);
```

Specifications
--------------

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.8 |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `WebGLRenderingContext.getVertexAttrib()`
WebGL2RenderingContext: transformFeedbackVaryings() method
==========================================================

 The **`WebGL2RenderingContext.transformFeedbackVaryings()`**
 method of the WebGL 2 API specifies values
 to record in `WebGLTransformFeedback` buffers.

Syntax
------


```js
transformFeedbackVaryings(program, varyings, bufferMode)
```

### Parameters

`program`

A `WebGLProgram`.

`varyings`

 An `Array` of string specifying the names of the
 varying variables to use.


`bufferMode`

 A `GLenum` specifying the mode to use when capturing the varying
 variables. Either `gl.INTERLEAVED_ATTRIBS` or
 `gl.SEPARATE_ATTRIBS`.


### Return value

None (`undefined`).

Examples
--------


```js
const transformFeedback = gl.createTransformFeedback();
gl.bindTransformFeedback(gl.TRANSFORM\_FEEDBACK, transformFeedback);
const transformFeedbackOutputs = ["gl\_Position", "anotherOutput"];

gl.transformFeedbackVaryings(
  shaderProg,
  transformFeedbackOutputs,
  gl.INTERLEAVED\_ATTRIBS,
);
gl.linkProgram(shaderProg);
```

Specifications
--------------

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.15 |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `WebGLTransformFeedback`
WebGL2RenderingContext: getActiveUniformBlockParameter() method
===============================================================

 The
 **`WebGL2RenderingContext.getActiveUniformBlockParameter()`**
 method of the WebGL 2 API retrieves
 information about an active uniform block within a `WebGLProgram`.

Syntax
------


```js
getActiveUniformBlockParameter(program, uniformBlockIndex, pname)
```

### Parameters

`program`

A `WebGLProgram` containing the active uniform block.

`uniformBlockIndex`

 A `GLuint` specifying the index of the active uniform block within the
 program.


`pname`

A `GLenum` specifying which information to query. Possible values:

`gl.UNIFORM_BLOCK_BINDING`

 Returns a `GLuint`
 indicating the uniform buffer binding point.


`gl.UNIFORM_BLOCK_DATA_SIZE`

 Returns a `GLuint`
 indicating the minimum total buffer object size.


`gl.UNIFORM_BLOCK_ACTIVE_UNIFORMS`

 Returns a `GLuint`
 indicating the number of active uniforms in the uniform block.


`gl.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES`

 Returns a
 `Uint32Array` indicating the list of active uniforms in the uniform
 block.


`gl.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER`

 Returns a
 `GLboolean` indicating whether the uniform block is referenced by the
 vertex shader.


`gl.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER`

 Returns a
 `GLboolean` indicating whether the uniform block is referenced by the
 fragment shader.



### Return value

 Depends on which information is requested using the `pname` parameter. If an
 error occurs, `null` is returned.

Examples
--------


```js
const blockSize = gl.getActiveUniformBlockParameter(
  program,
  blockIndex,
  gl.UNIFORM\_BLOCK\_DATA\_SIZE,
);
```

Specifications
--------------

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.16 |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `WebGL2RenderingContext.getActiveUniforms()`
WebGL2RenderingContext: getUniformIndices() method
==================================================

 The **`WebGL2RenderingContext.getUniformIndices()`** method of
 the WebGL 2 API retrieves the indices of a
 number of uniforms within a `WebGLProgram`.

Syntax
------


```js
getUniformIndices(program, uniformNames)
```

### Parameters

`program`

A `WebGLProgram` containing uniforms whose indices to query.

`uniformNames`

 An `Array` of string specifying the names of the
 uniforms to query.


### Return value

An `Array` of `GLuint` containing the uniform indices.

Examples
--------


```js
const uniformIndices = gl.getUniformIndices(program, [
  "UBORed",
  "UBOGreen",
  "UBOBlue",
]);
```

Specifications
--------------

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.16 |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `WebGL2RenderingContext.getUniformBlockIndex()`
WebGL2RenderingContext: getQueryParameter() method
==================================================

 The **`WebGL2RenderingContext.getQueryParameter()`** method of
 the WebGL 2 API returns parameter
 information of a `WebGLQuery` object.

Syntax
------


```js
getQueryParameter(query, pname)
```

### Parameters

`query`

A `WebGLQuery` object.

`pname`

A `GLenum` specifying which information to return. Possible values:

`gl.QUERY_RESULT`

 Returns a `GLuint` containing the
 query result.


`gl.QUERY_RESULT_AVAILABLE`

 Returns a `GLboolean`
 indicating whether or not a query result is available.



### Return value

 Depends on the `pname` parameter, either a `GLuint` or a
 `GLboolean`.

Examples
--------


```js
const query = gl.createQuery();
gl.beginQuery(gl.ANY\_SAMPLES\_PASSED, query);

const result = gl.getQueryParameter(query, gl.QUERY\_RESULT);
```

Specifications
--------------

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.12 |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `WebGLQuery`
WebGL2RenderingContext: renderbufferStorageMultisample() method
===============================================================

 The
 **`WebGL2RenderingContext.renderbufferStorageMultisample()`**
 method of the WebGL 2 API returns creates
 and initializes a renderbuffer object's data store and allows specifying a number of
 samples to be used.

Syntax
------


```js
renderbufferStorageMultisample(target, samples, internalFormat, width, height)
```

### Parameters

`target`

A `GLenum` specifying the target renderbuffer object. Possible values:

`gl.RENDERBUFFER`

 Buffer data storage for single images in a
 renderable internal format.



`samples`

 A `GLsizei` specifying the number of samples to be used for the
 renderbuffer storage.


`internalFormat`

 A `GLenum` specifying the internal format of the renderbuffer. Possible
 values (`gl.DEPTH_STENCIL` is not supported):


* `gl.R8`
* `gl.R8UI`
* `gl.R8I`
* `gl.R16UI`
* `gl.R16I`
* `gl.R32UI`
* `gl.R32I`
* `gl.RG8`
* `gl.RG8UI`
* `gl.RG8I`
* `gl.RG16UI`
* `gl.RG16I`
* `gl.RG32UI`
* `gl.RG32I`
* `gl.RGB8`
* `gl.RGBA8`
* `gl.SRGB8_ALPHA8`
* `gl.RGBA4`
* `gl.RGB565`
* `gl.RGB5_A1`
* `gl.RGB10_A2`
* `gl.RGBA8UI`
* `gl.RGBA8I`
* `gl.RGB10_A2UI`
* `gl.RGBA16UI`
* `gl.RGBA16I`
* `gl.RGBA32I`
* `gl.RGBA32UI`
* `gl.DEPTH_COMPONENT16`
* `gl.DEPTH_COMPONENT24`
* `gl.DEPTH_COMPONENT32F`
* `gl.DEPTH_STENCIL`
* `gl.DEPTH24_STENCIL8`
* `gl.DEPTH32F_STENCIL8`
* `gl.STENCIL_INDEX8`

`width`

A `GLsizei` specifying the width of the renderbuffer in pixels.

`height`

A `GLsizei` specifying the height of the renderbuffer in pixels.

### Return value

None (`undefined`).

Examples
--------


```js
gl.renderbufferStorageMultisample(gl.RENDERBUFFER, 4, gl.RGBA4, 256, 256);
```

Specifications
--------------

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.5 |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `WebGLRenderingContext.renderbufferStorage()`
* `WebGLRenderingContext.bindRenderbuffer()`
* `WebGLRenderingContext.createRenderbuffer()`
* `WebGLRenderingContext.deleteRenderbuffer()`
* `WebGLRenderingContext.getRenderbufferParameter()`
WebGL2RenderingContext: getUniformBlockIndex() method
=====================================================

 The **`WebGL2RenderingContext.getUniformBlockIndex()`** method
 of the WebGL 2 API retrieves the index of
 a uniform block within a `WebGLProgram`.

Syntax
------


```js
getUniformBlockIndex(program, uniformBlockName)
```

### Parameters

`program`

A `WebGLProgram` containing the uniform block.

`uniformName`

 A string specifying the name of the uniform block to whose index
 to retrieve.


### Return value

A `GLuint` indicating the uniform block index.

Examples
--------


```js
// Assuming a shader with the following declaration:
// uniform UBOData {
// mat4 foo;
// } instanceName;

// use the block name, not the instance name:
const blockIndex = gl.getUniformBlockIndex(program, "UBOData");
```

Specifications
--------------

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.16 |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `WebGL2RenderingContext.getUniformIndices()`
WebGL2RenderingContext: getInternalformatParameter() method
===========================================================

 The **`WebGL2RenderingContext.getInternalformatParameter()`**
 method of the WebGL 2 API returns
 information about implementation-dependent support for internal formats.

Syntax
------


```js
getInternalformatParameter(target, internalformat, pname)
```

### Parameters

`target`

A `GLenum` specifying the target renderbuffer object. Possible values:

`gl.RENDERBUFFER`

 Buffer data storage for single images in a
 renderable internal format.



`internalformat`

 A `GLenum` specifying the internal format about which to retrieve
 information (must be a color-renderable, depth-renderable or stencil-renderable
 format).


`pname`

 A `GLenum` specifying the type of information to query. Possible
 values:


`gl.SAMPLES`

 Returns a `Int32Array` containing sample
 counts supported for `internalformat` in descending order.



### Return value

 Depends on the requested information (as specified with `pname`). It is an
 `Int32Array` if `pname` is `gl.SAMPLES`.

Examples
--------


```js
const samples = gl.getInternalformatParameter(
  gl.RENDERBUFFER,
  gl.RGBA8,
  gl.SAMPLES,
);
```

Specifications
--------------

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.5 |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `WebGLRenderingContext.getRenderbufferParameter()`
WebGL2RenderingContext: deleteVertexArray() method
==================================================

 The **`WebGL2RenderingContext.deleteVertexArray()`** method of
 the WebGL 2 API deletes a given
 `WebGLVertexArrayObject` object.

Syntax
------


```js
deleteVertexArray(vertexArray)
```

### Parameters

`vertexArray`

A `WebGLVertexArrayObject` (VAO) object to delete.

### Return value

None (`undefined`).

Examples
--------


```js
const vao = gl.createVertexArray();
gl.bindVertexArray(vao);

// …

gl.deleteVertexArray(vao);
```

Specifications
--------------

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.17 |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `WebGLVertexArrayObject`
WebGL2RenderingContext: deleteSync() method
===========================================

 The **`WebGL2RenderingContext.deleteSync()`** method of the WebGL 2 API deletes a given
 `WebGLSync` object.

Syntax
------


```js
deleteSync(sync)
```

### Parameters

`sync`

A `WebGLSync` object to delete.

### Return value

None (`undefined`).

Examples
--------

`gl` must be a `WebGL2RenderingContext`. `WebGLSync`
 objects are not available in WebGL 1.


```js
const sync = gl.fenceSync(gl.SYNC\_GPU\_COMMANDS\_COMPLETE, 0);

// …

gl.deleteSync(sync);
```

Specifications
--------------

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.13 |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `WebGLSync`
WebGL2RenderingContext: getQuery() method
=========================================

 The **`WebGL2RenderingContext.getQuery()`** method of the WebGL 2 API returns the currently active
 `WebGLQuery` for the `target`, or `null`.

Syntax
------


```js
getQuery(target, pname)
```

### Parameters

`target`

A `GLenum` specifying the target of the query. Possible values:

`gl.ANY_SAMPLES_PASSED`

 Specifies an occlusion query: these queries
 detect whether an object is visible (whether the scoped drawing commands pass the
 depth test and if so, how many samples pass).


`gl.ANY_SAMPLES_PASSED_CONSERVATIVE`

 Same as above, but less
 accurate and faster version.


`gl.TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN`

 Number of primitives that
 are written to transform feedback buffers.



`pname`

 A `GLenum` specifying the query object target. Must be
 `gl.CURRENT_QUERY`.


### Return value

A `WebGLQuery` object.

Examples
--------


```js
const currentQuery = gl.getQuery(gl.ANY\_SAMPLES\_PASSED, gl.CURRENT\_QUERY);
```

Specifications
--------------

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.12 |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `WebGLQuery`
WebGL2RenderingContext: texStorage3D() method
=============================================

 The **`WebGL2RenderingContext.texStorage3D()`** method of the
 WebGL API specifies all levels of a
 three-dimensional texture or two-dimensional array texture.

Syntax
------


```js
texStorage3D(target, levels, internalformat, width, height, depth)
```

### Parameters

`target`

 A `GLenum` specifying the binding point (target) of the active texture.
 Possible values:


* `gl.TEXTURE_3D`: A three-dimensional texture.
* `gl.TEXTURE_2D_ARRAY`: A two-dimensional array texture.

`level`

A `GLint` specifying the number of texture levels.

`internalformat`

A `GLenum` specifying the texture store format. Possible values:

* `gl.R8`
* `gl.R16F`
* `gl.R32F`
* `gl.R8UI`
* `gl.RG8`
* `gl.RG16F`
* `gl.RG32F`
* `gl.RGUI`
* `gl.RGB8`
* `gl.SRGB8`
* `gl.RGB565`
* `gl.R11F_G11F_B10F`
* `gl.RGB9_E5`
* `gl.RGB16F`
* `gl.RGB32F`
* `gl.RGB8UI`
* `gl.RGBA8`
* `gl.SRGB_ALPHA8`
* `gl.RGB5_A1`
* `gl.RGBA4444`
* `gl.RGBA16F`
* `gl.RGBA32F`
* `gl.RGBA8UI`

In addition if the `WEBGL_compressed_texture_etc` extension is supported, the following values are also possible:

* `gl.COMPRESSED_R11_EAC`
* `gl.COMPRESSED_SIGNED_R11_EAC`
* `gl.COMPRESSED_RG11_EAC`
* `gl.COMPRESSED_SIGNED_RG11_EAC`
* `gl.COMPRESSED_RGB8_ETC2`
* `gl.COMPRESSED_RGBA8_ETC2_EAC`
* `gl.COMPRESSED_SRGB8_ETC2`
* `gl.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC`
* `gl.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2`
* `gl.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2`

`width`

A `GLsizei` specifying the width of the texture.

`height`

A `GLsizei` specifying the height of the texture.

`depth`

A `GLsizei` specifying the depth of the texture.

### Return value

None (`undefined`).

Examples
--------


```js
gl.texStorage3D(gl.TEXTURE\_3D, 1, gl.RGB8, 256, 256, 256);
```

Specifications
--------------

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.6 |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `WebGLRenderingContext.compressedTexImage2D()`
WebGL2RenderingContext: fenceSync() method
==========================================

 The **`WebGL2RenderingContext.fenceSync()`** method of the WebGL 2 API creates a new
 `WebGLSync` object and inserts it into the GL command stream.

Syntax
------


```js
fenceSync(condition, flags)
```

### Parameters

`condition`

 A `GLenum` specifying the condition that must be met to set the sync
 object's state to signaled. Must be `gl.SYNC_GPU_COMMANDS_COMPLETE`.


`flags`

 A `GLbitfield` specifying a bitwise combination of flags controlling
 the behavior of the sync object. Must be `0` (exists for extensions only).


### Return value

A `WebGLSync` object.

Examples
--------

`gl` must be a `WebGL2RenderingContext`. `WebGLSync`
 objects are not available in WebGL 1.


```js
const sync = gl.fenceSync(gl.SYNC\_GPU\_COMMANDS\_COMPLETE, 0);
```

Specifications
--------------

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.14 |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `WebGLSync`
WebGL2RenderingContext: blitFramebuffer() method
================================================

 The **`WebGL2RenderingContext.blitFramebuffer()`** method of
 the WebGL 2 API transfers a block of pixels
 from the read framebuffer to the draw framebuffer. Read and draw framebuffers are bound
 using `WebGLRenderingContext.bindFramebuffer()`.

Syntax
------


```js
blitFramebuffer(srcX0, srcY0, srcX1, srcY1,
                dstX0, dstY0, dstX1, dstY1,
                mask, filter)
```

### Parameters

`srcX0, srcY0, srcX1, srcY1`

A `GLint` specifying the bounds of the source rectangle.

`dstX0, dstY0, dstX1, dstY1`

A `GLint` specifying the bounds of the destination rectangle.

`mask`

 A `GLbitfield` specifying a bitwise OR mask indicating which buffers
 are to be copied. Possible values:


* `gl.COLOR_BUFFER_BIT`
* `gl.DEPTH_BUFFER_BIT`
* `gl.STENCIL_BUFFER_BIT`

`filter`

 A `GLenum` specifying the interpolation to be applied if the image is
 stretched. Possible values:


* `gl.NEAREST`
* `gl.LINEAR`

### Return value

None (`undefined`).

Examples
--------


```js
gl.blitFramebuffer(
  0,
  0,
  canvas.width,
  canvas.height,
  0,
  0,
  canvas.width,
  canvas.height,
  gl.COLOR\_BUFFER\_BIT,
  gl.NEAREST,
);
```

Specifications
--------------

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.4 |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `WebGLRenderingContext.bindFramebuffer()`
* `WebGLRenderingContext.getRenderbufferParameter()`
WebGL2RenderingContext: beginTransformFeedback() method
=======================================================

 The **`WebGL2RenderingContext.beginTransformFeedback()`**
 method of the WebGL 2 API starts a transform
 feedback operation.

Syntax
------


```js
beginTransformFeedback(primitiveMode)
```

### Parameters

`primitiveMode`

 A `GLenum` specifying the output type of the primitives that will be
 recorded into the buffer objects that are bound for transform feedback. Possible
 values:


* `gl.POINTS`
* `gl.LINES`
* `gl.TRIANGLES`

### Return value

None (`undefined`).

Examples
--------


```js
const transformFeedback = gl.createTransformFeedback();
gl.bindTransformFeedback(gl.TRANSFORM\_FEEDBACK, transformFeedback);
gl.beginTransformFeedback(gl.TRIANGLES);
gl.drawArrays(gl.TRIANGLES, 0, 3);
```

Specifications
--------------

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.15 |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `WebGLTransformFeedback`
WebGL2RenderingContext: isQuery() method
========================================

 The **`WebGL2RenderingContext.isQuery()`** method of the WebGL 2 API returns `true` if the
 passed object is a valid `WebGLQuery` object.

Syntax
------


```js
isQuery(query)
```

### Parameters

`query`

A `WebGLQuery` object to test.

### Return value

 A `GLboolean` indicating whether the given object is a valid
 `WebGLQuery` object (`true`) or not (`false`).

Examples
--------

`gl` must be a `WebGL2RenderingContext`.
 `WebGLQuery` objects are not available in WebGL 1.


```js
const query = gl.createQuery();

// …

gl.isQuery(query);
```

Specifications
--------------

| Specification |
| --- |
| WebGL 2.0 Specification # 3.7.12 |

Browser compatibility
---------------------

BCD tables only load in the browser with JavaScript enabled. Enable JavaScript to view data.

See also
--------

* `WebGLQuery`