WebGLRenderingContext.getAttribLocation()
WebGL API の WebGLRenderingContext.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