---
title: WebGLRenderingContext.flush()
slug: Web/API/WebGLRenderingContext/flush
tags:
  - API
  - Method
  - Reference
  - WebGL
  - WebGLRenderingContext
browser-compat: api.WebGLRenderingContext.flush
---
{{APIRef("WebGL")}}

The **`WebGLRenderingContext.flush()`** method of the [WebGL API](/en-US/docs/Web/API/WebGL_API) empties different buffer commands,
causing all commands to be executed as quickly as possible.

## Syntax

```js
void gl.flush();
```

### Parameters

None.

### Return value

None.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}

## See also

- {{domxref("WebGLRenderingContext.finish()")}}
