WebGLRenderingContext.deleteBuffer()
The WebGLRenderingContext.deleteBuffer()
method of the WebGL API deletes a given
WebGLBuffer
. This method has no effect if the buffer has already been
deleted.
Syntax
void gl.deleteBuffer(buffer);
Parameters
- buffer
-
A
WebGLBuffer
object to delete.
Return value
None.
Examples
Deleting a buffer
var canvas = document.getElementById('canvas');
var gl = canvas.getContext('webgl');
var buffer = gl.createBuffer();
// ...
gl.deleteBuffer(buffer);
Specifications
Specification |
---|
WebGL Specification # 5.14.5 |
Browser compatibility
BCD tables only load in the browser