WEBGL_compressed_texture_etc1
扩展属于
WebGL API
and exposes the
ETC1 compressed texture format
.
Compressed textures reduce the amount of memory needed to store a texture on the GPU, allowing for higher resolution textures or more of the same resolution textures.
WebGL extensions are available using the
WebGLRenderingContext.getExtension()
method. For more information, see also
使用扩展
在
WebGL 教程
.
可用性: This extension is available to both, WebGL1 and WebGL2 上下文。
The compressed texture format is exposed by a constant and can be used with the
compressedTexImage2D()
method (note that ETC1 is
not
supported with the
compressedTexSubImage2D()
方法)。
ext.COMPRESSED_RGB_ETC1_WEBGL
Compresses 24-bit RGB data with no alpha channel.
var ext = gl.getExtension('WEBGL_compressed_texture_etc1');
var texture = gl.createTexture();
gl.bindTexture(gl.TEXTURE_2D, texture);
gl.compressedTexImage2D(gl.TEXTURE_2D, 0, ext.COMPRESSED_RGB_ETC1_WEBGL, 512, 512, 0, textureData);
| 规范 | 状态 | 注释 |
|---|---|---|
|
WEBGL_compressed_texture_etc1
The definition of 'WEBGL_compressed_texture_etc1' in that specification. |
草案 | 初始定义。 |
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
更新 GitHub 上的兼容性数据| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
WEBGL_compressed_texture_etc1
|
Chrome Yes | Edge 79 | Firefox 30 | IE ? | Opera Yes | Safari ? | WebView Android Yes | Chrome Android Yes | Firefox Android ? | Opera Android Yes | Safari iOS ? | Samsung Internet Android Yes |
完整支持
兼容性未知
WEBGL_compressed_texture_es3
(ETC2 and EAC)
WebGLRenderingContext.getExtension()
WebGLRenderingContext.compressedTexImage2D()
WebGLRenderingContext.getParameter()
WEBGL_compressed_texture_etc1
ANGLE_instanced_arrays
EXT_blend_minmax
EXT_color_buffer_half_float
EXT_disjoint_timer_query
EXT_frag_depth
EXT_sRGB
EXT_shader_texture_lod
EXT_texture_filter_anisotropic
OES_element_index_uint
OES_standard_derivatives
OES_texture_float
OES_texture_float_linear
OES_texture_half_float
OES_texture_half_float_linear
OES_vertex_array_object
WEBGL_color_buffer_float
WEBGL_compressed_texture_atc
WEBGL_compressed_texture_pvrtc
WEBGL_compressed_texture_s3tc
WEBGL_compressed_texture_s3tc_srgb
WEBGL_debug_renderer_info
WEBGL_debug_shaders
WEBGL_depth_texture
WEBGL_draw_buffers
WEBGL_lose_context
WebGL2RenderingContext
WebGLActiveInfo
WebGLBuffer
WebGLContextEvent
WebGLFramebuffer
WebGLObject
WebGLProgram
WebGLQuery
WebGLRenderbuffer
WebGLRenderingContext
WebGLSampler
WebGLShader
WebGLShaderPrecisionFormat
WebGLSync
WebGLTexture
WebGLTransformFeedback
WebGLUniformLocation
WebGLVertexArrayObject