浏览代码

gl.UNSIGNED_BYTE type for Uint8ClampedArray (#21876)

0X-JonMichaelGalindo 4 年之前
父节点
当前提交
c50649f1ce
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      src/renderers/webgl/WebGLAttributes.js

+ 4 - 0
src/renderers/webgl/WebGLAttributes.js

@@ -66,6 +66,10 @@ function WebGLAttributes( gl, capabilities ) {
 
 			type = gl.UNSIGNED_BYTE;
 
+		} else if ( array instanceof Uint8ClampedArray ) {
+			
+			type = gl.UNSIGNED_BYTE;
+			
 		}
 
 		return {