--- title: ANGLE_instanced_arrays slug: Web/API/ANGLE_instanced_arrays tags: - API - Reference - WebGL - WebGL extension translation_of: Web/API/ANGLE_instanced_arrays ---
{{APIRef("WebGL")}}

ANGLE_instanced_arrays この拡張機能はWebGL APIの一部です。 同じ頂点データ、プリミティブカウント、およびタイプを共有する場合は、同じオブジェクトまたは同様のオブジェクトのグループを複数回描画できます。

{{domxref("WebGLRenderingContext.getExtension()")}} メソッドを使用して WebGL拡張を利用できます. 詳細については、WebGL tutorialUsing Extensionsも参照してください。

Availability: This extension is only available to {{domxref("WebGLRenderingContext", "WebGL1", "", 1)}} contexts. In {{domxref("WebGL2RenderingContext", "WebGL2", "", 1)}}, the functionality of this extension is available on the WebGL2 context 既定では 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.

定数

この拡張は新た定数を公開します。この定数は{{domxref("WebGLRenderingContext.getVertexAttrib()", "gl.getVertexAttrib()")}}メソッドで使用できます:

ext.VERTEX_ATTRIB_ARRAY_DIVISOR_ANGLE
Returns a {{domxref("GLint")}} describing the frequency divisor used for instanced rendering when used in the {{domxref("WebGLRenderingContext.getVertexAttrib()", "gl.getVertexAttrib()")}} as the pname parameter.

メソッド

この拡張機能は3つの新しいメソッドを公開しています。

{{domxref("ANGLE_instanced_arrays.drawArraysInstancedANGLE()", "ext.drawArraysInstancedANGLE()")}}

Behaves identically to {{domxref("WebGLRenderingContext.drawArrays()", "gl.drawArrays()")}} except that multiple instances of the range of elements are executed, and the instance advances for each iteration.

{{domxref("ANGLE_instanced_arrays.drawElementsInstancedANGLE()", "ext.drawElementsInstancedANGLE()")}}

Behaves identically to {{domxref("WebGLRenderingContext.drawElements()", "gl.drawElements()")}} except that multiple instances of the set of elements are executed and the instance advances between each set.

{{domxref("ANGLE_instanced_arrays.vertexAttribDivisorANGLE()", "ext.vertexAttribDivisorANGLE()")}}

Modifies the rate at which generic vertex attributes advance when rendering multiple instances of primitives with {{domxref("ANGLE_instanced_arrays.drawArraysInstancedANGLE()", "ext.drawArraysInstancedANGLE()")}} and {{domxref("ANGLE_instanced_arrays.drawElementsInstancedANGLE()", "ext.drawElementsInstancedANGLE()")}}.

Enabling the extension:

var ext = gl.getExtension('ANGLE_instanced_arrays');

仕様

仕様書 策定状況 コメント
{{SpecName('ANGLE_instanced_arrays', '', 'ANGLE_instanced_arrays')}} {{Spec2('ANGLE_instanced_arrays')}} 初期定義

ブラウザ実装状況

{{Compat("api.ANGLE_instanced_arrays")}}

関連情報