WebGLRenderingContext.getAttribLocation()

WebGL APIWebGLRenderingContext.getAttribLocation() メソッドは指定されたWebGLProgram (en-US)内の属性の場所を返します。

構文

GLint gl.getAttribLocation(program, name);

引数

program

属性の変数を含むWebGLProgram (en-US)

name

場所を取得する属性の変数名を指定するDOMString

返り値

見つかった場合、変数名の場所を示すGLint (en-US)番号を、それ以外の場合は-1 を返します。

gl.getAttribLocation(program, 'vColor');

仕様策定状況

Specification
WebGL Specification
# 5.14.10

ブラウザーの対応

BCD tables only load in the browser

関連項目