ANGLE_instanced_arrays.drawElementsInstancedANGLE()
方法在
WebGL API
renders primitives from array data like the
gl.drawElements()
method. In addition, it can execute multiple instances of a set of elements.
注意:
当使用
WebGL2
, this method is available as
gl.drawElementsInstanced()
在默认情况下。
void ext.drawElementsInstancedANGLE(mode, count, type, offset, primcount);
mode
GLenum
specifying the type primitive to render. Possible values are:
gl.POINTS
: Draws a single dot.
gl.LINE_STRIP
: Draws a straight line to the next vertex.
gl.LINE_LOOP
: Draws a straight line to the next vertex, and connects the last vertex back to the first.
gl.LINES
: Draws a line between a pair of vertices.
gl.TRIANGLE_STRIP
gl.TRIANGLE_FAN
gl.TRIANGLES
: Draws a triangle for a group of three vertices.
GLsizei
specifying the number of elements to be rendered.
GLenum
specifying the type of the values in the element array buffer. Possible values are:
gl.UNSIGNED_BYTE
gl.UNSIGNED_SHORT
OES_element_index_uint
extension:
gl.UNSIGNED_INT
GLintptr
specifying an offset in the element array buffer. Must be a valid multiple of the size of the given
type
.
GLsizei
specifying the number of instances of the set of elements to execute.
None.
mode
is not one of the accepted values, a
gl.INVALID_ENUM
error is thrown.
offset
is a invalid multiple of the size of the given type, a
gl.INVALID_OPERATION
error is thrown.
count
or
primcount
are negative, a
gl.INVALID_VALUE
error is thrown.
var ext = gl.getExtension('ANGLE_instanced_arrays');
ext.drawElementsInstancedANGLE(gl.POINTS, 2, gl.UNSIGNED_SHORT, 0, 4);
| 规范 | 状态 | 注释 |
|---|---|---|
|
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 上的兼容性数据| 桌面 | 移动 | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
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 |
完整支持
ext.drawArraysInstancedANGLE()
ext.vertexAttribDivisorANGLE()
WebGLRenderingContext.drawArrays()
WebGLRenderingContext.drawElements()
WebGL2RenderingContext.drawArraysInstanced()
WebGL2RenderingContext.drawElementsInstanced()
WebGL2RenderingContext.vertexAttribDivisor()
ANGLE_instanced_arrays
drawArraysInstancedANGLE()
drawElementsInstancedANGLE()
vertexAttribDivisorANGLE()
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