MDN self-hosted library · e01.org

WebGLRenderingContext: activeTexture() method

Runnable notebook: every JavaScript, HTML and CSS example on this page executes in a sandboxed local frame. Nothing leaves the browser.

js
gl.activeTexture(gl.TEXTURE1);
js
gl.getParameter(gl.MAX_COMBINED_TEXTURE_IMAGE_UNITS);
js
gl.activeTexture(gl.TEXTURE0);
gl.getParameter(gl.ACTIVE_TEXTURE);
// returns "33984" (0x84C0, gl.TEXTURE0 enum value)