const ext = gl.getExtension("WEBGL_compressed_texture_etc");
const texture = gl.createTexture();
gl.bindTexture(gl.TEXTURE_2D, texture);
gl.compressedTexImage2D(
gl.TEXTURE_2D,
0,
ext.COMPRESSED_RGBA8_ETC2_EAC,
512,
512,
0,
textureData,
);WEBGL_compressed_texture_etc extension / notebook
WEBGL_compressed_texture_etc extension
Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.