ANGLE_instanced_arrays
扩展属于
WebGL API
and allows to draw the same object, or groups of similar objects multiple times, if they share the same vertex data, primitive count and type.
WebGL extensions are available using the
WebGLRenderingContext.getExtension()
method. For more information, see also
使用扩展
在
WebGL 教程
.
可用性:
This extension is only available to
WebGL1
contexts. In
WebGL2
, the functionality of this extension is available on the WebGL2 context by default and the constants and methods are available without the "
ANGLE
" suffix.
Despite the name "ANGLE", this extension works on any device if the hardware supports it and not just on Windows when using the ANGLE library. "ANGLE" just indicates that this extension has been written by the ANGLE library authors.
This extension exposes one new constant, which can be used in the
gl.getVertexAttrib()
方法:
ext.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE
GLint
describing the frequency divisor used for instanced rendering when used in the
gl.getVertexAttrib()
作为
pname
参数。
This extension exposes three new methods.
ext.drawArraysInstancedANGLE()
Behaves identically to
gl.drawArrays()
except that multiple instances of the range of elements are executed, and the instance advances for each iteration.
ext.drawElementsInstancedANGLE()
Behaves identically to
gl.drawElements()
except that multiple instances of the set of elements are executed and the instance advances between each set.
ext.vertexAttribDivisorANGLE()
Modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives with
ext.drawArraysInstancedANGLE()
and
ext.drawElementsInstancedANGLE()
.
Enabling the extension:
var ext = gl.getExtension('ANGLE_instanced_arrays');
| 规范 | 状态 | 注释 |
|---|---|---|
|
ANGLE_instanced_arrays
The definition of 'ANGLE_instanced_arrays' 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 上的兼容性数据| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
ANGLE_instanced_arrays
|
Chrome
30
Alternate Name
|
Edge
79
Alternate Name
|
Firefox 33 | IE 11 |
Opera
17
Alternate Name
|
Safari 7 |
WebView Android
4.4
Alternate Name
|
Chrome Android
30
Alternate Name
|
Firefox Android Yes |
Opera Android
18
Alternate Name
|
Safari iOS Yes |
Samsung Internet Android
2.0
Alternate Name
|
drawArraysInstancedANGLE
|
Chrome 30 | Edge 12 | Firefox 33 | IE 11 | Opera 17 | Safari 7 | WebView Android 4.4 | Chrome Android 30 | Firefox Android Yes | Opera Android 18 | Safari iOS Yes | Samsung Internet Android 2.0 |
drawElementsInstancedANGLE
|
Chrome 30 | Edge 12 | Firefox 33 | IE 11 | Opera 17 | Safari 7 | WebView Android 4.4 | Chrome Android 30 | Firefox Android Yes | Opera Android 18 | Safari iOS Yes | Samsung Internet Android 2.0 |
vertexAttribDivisorANGLE
|
Chrome 30 | Edge 12 | Firefox 33 | IE 11 | Opera 17 | Safari 7 | WebView Android 4.4 | Chrome Android 30 | Firefox Android Yes | Opera Android 18 | Safari iOS Yes | Samsung Internet Android 2.0 |
完整支持
使用非标名称。
WebGLRenderingContext.getExtension()
WebGL2RenderingContext.drawArraysInstanced()
WebGL2RenderingContext.drawElementsInstanced()
WebGL2RenderingContext.vertexAttribDivisor()
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_etc1
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