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