const canvas = document.getElementById("canvas");
const gl = canvas.getContext("webgl");
const texture = gl.createTexture();
gl.bindTexture(gl.TEXTURE_2D, texture);WebGLRenderingContext: bindTexture() method / notebook
WebGLRenderingContext: bindTexture() method
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.
// Unbind any texture currently bound to TEXTURE_2D
gl.bindTexture(gl.TEXTURE_2D, null);gl.getParameter(gl.TEXTURE_BINDING_2D);