Type alias TextureDataType
TextureDataType: "UNSIGNED_BYTE" | "UNSIGNED_SHORT_5_6_5" | "UNSIGNED_SHORT_4_4_4_4" | "UNSIGNED_SHORT_5_5_5_1" | "UNSIGNED_SHORT" | "UNSIGNED_INT" | "UNSIGNED_INT_24_8_WEBGL" | "FLOAT" | "HALF_FLOAT_OES" | "BYTE" | "SHORT" | "INT" | "HALF_FLOAT" | "UNSIGNED_INT_2_10_10_10_REV" | "UNSIGNED_INT_10F_11F_11F_REV" | "UNSIGNED_INT_5_9_9_9_REV" | "UNSIGNED_INT_24_8" | "FLOAT_32_UNSIGNED_INT_24_8_REV"
纹理数据类型 A GLenum specifying the data type of the texel data
UNSIGNED_BYTE8 bits per channel for gl.RGBAUNSIGNED_SHORT_5_6_55 red bits, 6 green bits, 5 blue bits.UNSIGNED_SHORT_4_4_4_44 red bits, 4 green bits, 4 blue bits, 4 alpha bits.UNSIGNED_SHORT_5_5_5_15 red bits, 5 green bits, 5 blue bits, 1 alpha bit.UNSIGNED_SHORTWhen using the WEBGL_depth_texture extension:UNSIGNED_INTWhen using the WEBGL_depth_texture extension:UNSIGNED_INT_24_8_WEBGLWhen using the WEBGL_depth_texture extension:(constant provided by the extension)FLOATWhen using the OES_texture_float extension:HALF_FLOAT_OESWhen using the OES_texture_half_float extension:(constant provided by the extension)BYTEusing a WebGL 2 contextSHORTusing a WebGL 2 contextINTusing a WebGL 2 contextHALF_FLOATusing a WebGL 2 contextUNSIGNED_INT_2_10_10_10_REVusing a WebGL 2 contextUNSIGNED_INT_10F_11F_11F_REVusing a WebGL 2 contextUNSIGNED_INT_5_9_9_9_REVusing a WebGL 2 contextUNSIGNED_INT_24_8using a WebGL 2 contextFLOAT_32_UNSIGNED_INT_24_8_REVusing a WebGL 2 context(pixels must be null)See
https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/texImage2D