This extension adds a new constant:
ext.UNSIGNED_INT_24_8_WEBGL
Unsigned integer type for 24-bit depth texture data.
This extension extends WebGLRenderingContext.texImage2D()
:
format
and internalformat
parameters now accept gl.DEPTH_COMPONENT
and gl.DEPTH_STENCIL
.type
parameter now accepts gl.UNSIGNED_SHORT
, gl.UNSIGNED_INT
, and ext.UNSIGNED_INT_24_8_WEBGL
.pixels
parameter now accepts a Uint16Array
or a Uint32Array
object.This extension extends WebGLRenderingContext.framebufferTexture2D()
:
attachment
parameter now accepts gl.DEPTH_STENCIL_ATTACHMENT
.const ext = gl.getExtension("WEBGL_depth_texture");
gl.texImage2D(
gl.TEXTURE_2D,
0,
gl.DEPTH_COMPONENT,
512,
512,
0,
gl.DEPTH_COMPONENT,
gl.UNSIGNED_SHORT,
null,
);
Specifications Browser compatibility
Loadingâ¦
See alsoWebGLRenderingContext.getExtension()
WebGLRenderingContext.texImage2D()
WebGLRenderingContext.framebufferTexture2D()
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.5