/* COPYRIGHT Esri - https://js.arcgis.com/5.0/LICENSE.txt */
function _(_,E){if(E.compressedTextureETC)return null;const R=_.getExtension("WEBGL_compressed_texture_etc");return R?{COMPRESSED_R11_EAC:R.COMPRESSED_R11_EAC,COMPRESSED_SIGNED_R11_EAC:R.COMPRESSED_SIGNED_R11_EAC,COMPRESSED_RG11_EAC:R.COMPRESSED_RG11_EAC,COMPRESSED_SIGNED_RG11_EAC:R.COMPRESSED_SIGNED_RG11_EAC,COMPRESSED_RGB8_ETC2:R.COMPRESSED_RGB8_ETC2,COMPRESSED_SRGB8_ETC2:R.COMPRESSED_SRGB8_ETC2,COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2:R.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2,COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2:R.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2,COMPRESSED_RGBA8_ETC2_EAC:R.COMPRESSED_RGBA8_ETC2_EAC,COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:R.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC}:null}function E(_,E){if(E.compressedTextureS3TC)return null;const R=_.getExtension("WEBGL_compressed_texture_s3tc");return R?{COMPRESSED_RGB_S3TC_DXT1:R.COMPRESSED_RGB_S3TC_DXT1_EXT,COMPRESSED_RGBA_S3TC_DXT1:R.COMPRESSED_RGBA_S3TC_DXT1_EXT,COMPRESSED_RGBA_S3TC_DXT3:R.COMPRESSED_RGBA_S3TC_DXT3_EXT,COMPRESSED_RGBA_S3TC_DXT5:R.COMPRESSED_RGBA_S3TC_DXT5_EXT}:null}function R(_,E){if(E.drawBuffersIndexed)return null;const R=_.getExtension("OES_draw_buffers_indexed");return R||null}function t(_,E){if(E.textureFilterAnisotropic)return null;const R=_.getExtension("EXT_texture_filter_anisotropic")||_.getExtension("MOZ_EXT_texture_filter_anisotropic")||_.getExtension("WEBKIT_EXT_texture_filter_anisotropic");return R?{MAX_TEXTURE_MAX_ANISOTROPY:R.MAX_TEXTURE_MAX_ANISOTROPY_EXT,TEXTURE_MAX_ANISOTROPY:R.TEXTURE_MAX_ANISOTROPY_EXT}:null}function e(_,E){const R=!E.colorBufferHalfFloat&&_.getExtension("EXT_color_buffer_half_float")||!E.colorBufferFloat&&_.getExtension("EXT_color_buffer_float"),t=!E.colorBufferFloat&&_.getExtension("EXT_color_buffer_float"),e=!E.floatBlend&&!E.colorBufferFloat&&_.getExtension("EXT_float_blend");return R||t||e?{textureFloat:!!t,textureHalfFloat:!!R,floatBlend:!!e,R16F:_.R16F,RG16F:_.RG16F,RGBA16F:_.RGBA16F,R32F:_.R32F,RG32F:_.RG32F,RGBA32F:_.RGBA32F,R11F_G11F_B10F:_.R11F_G11F_B10F,RGB16F:_.RGB16F}:null}function S(_,E,R,t,e){if(t)return!0;if(E[R])return!1;for(const S of e)if(_.getExtension(S))return!0;return!1}function n(_,E){if(E.textureNorm16)return null;const R=_.getExtension("EXT_texture_norm16");return R?{R16:R.R16_EXT,RG16:R.RG16_EXT,RGB16:R.RGB16_EXT,RGBA16:R.RGBA16_EXT,R16_SNORM:R.R16_SNORM_EXT,RG16_SNORM:R.RG16_SNORM_EXT,RGB16_SNORM:R.RGB16_SNORM_EXT,RGBA16_SNORM:R.RGBA16_SNORM_EXT}:null}export{S as loadBooleanExtension,e as loadColorBufferFloat,_ as loadCompressedTextureETC,E as loadCompressedTextureS3TC,R as loadDrawBuffersIndexed,t as loadTextureFilterAnisotropicCapability,n as loadTextureNorm16};
