From 4cddf3af3d4960bb0fe4b7419ccfd361f6fdd41b Mon Sep 17 00:00:00 2001 From: pandamicro Date: Sat, 28 Dec 2019 16:33:31 +0800 Subject: [PATCH] Fix depth component constant not exist in WebGL issue (#5995) --- cocos/core/gfx/webgl/webgl-commands.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/core/gfx/webgl/webgl-commands.ts b/cocos/core/gfx/webgl/webgl-commands.ts index 05285ae314..460f4cc8e6 100644 --- a/cocos/core/gfx/webgl/webgl-commands.ts +++ b/cocos/core/gfx/webgl/webgl-commands.ts @@ -162,7 +162,7 @@ function GFXFormatToWebGLInternalFormat (format: GFXFormat, gl: WebGLRenderingCo case GFXFormat.R5G6B5: return gl.RGB565; case GFXFormat.RGB5A1: return gl.RGB5_A1; case GFXFormat.RGBA4: return gl.RGBA4; - case GFXFormat.D16: return gl.DEPTH_COMPONENT; + case GFXFormat.D16: return gl.DEPTH_COMPONENT16; case GFXFormat.D16S8: return gl.DEPTH_STENCIL; case GFXFormat.D24: return gl.DEPTH_COMPONENT; case GFXFormat.D24S8: return gl.DEPTH_STENCIL;