WebGLRenderingContext: getAttribLocation() メソッド
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
WebGLRenderingContext.getAttribLocation()
は WebGL API のメソッドで、指定された WebGLProgram
内の属性の場所を返します。
構文
js
getAttribLocation(program, name)
引数
program
-
属性の変数の入った
WebGLProgram
です。 name
-
場所を取得する属性の変数名を指定する文字列です。
返値
見つかった場合、変数名の場所を示す GLint
番号を返します。
それ以外の場合は -1 を返します。
例
js
gl.getAttribLocation(program, "vColor");
仕様書
Specification |
---|
WebGL Specification # 5.14.10 |
ブラウザーの互換性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
getAttribLocation |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on 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.