Skip to content

Commit 54fd070

Browse files
authored
wrong const value passed for webgl2 to op with image 3d (#297)
1 parent 6722aac commit 54fd070

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cocos/gfx/webgl2/webgl2-commands.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2986,7 +2986,7 @@ export function WebGL2CmdFuncCopyBuffersToTexture (
29862986

29872987
if (!isCompressed) {
29882988
gl.texSubImage3D(
2989-
WebGLConstants.TEXTURE_2D_ARRAY,
2989+
WebGLConstants.TEXTURE_3D,
29902990
mipLevel,
29912991
offset.x,
29922992
offset.y,
@@ -3000,7 +3000,7 @@ export function WebGL2CmdFuncCopyBuffersToTexture (
30003000
);
30013001
} else if (gpuTexture.glInternalFmt !== WebGL2EXT.COMPRESSED_RGB_ETC1_WEBGL as number) {
30023002
gl.compressedTexSubImage3D(
3003-
WebGLConstants.TEXTURE_2D_ARRAY,
3003+
WebGLConstants.TEXTURE_3D,
30043004
mipLevel,
30053005
offset.x,
30063006
offset.y,
@@ -3013,7 +3013,7 @@ export function WebGL2CmdFuncCopyBuffersToTexture (
30133013
);
30143014
} else { // WEBGL_compressed_texture_etc1
30153015
gl.compressedTexImage3D(
3016-
WebGLConstants.TEXTURE_2D_ARRAY,
3016+
WebGLConstants.TEXTURE_3D,
30173017
mipLevel,
30183018
gpuTexture.glInternalFmt,
30193019
destWidth,

0 commit comments

Comments
 (0)