web api instance method
WebGLRenderingContext: getAttribLocation() method
Available in workers
The WebGLRenderingContext.getAttribLocation() method of
the WebGL API returns the location of an
attribute variable in a given WebGLProgram.
Syntax
getAttribLocation(program, name)
Parameters
program- : A
WebGLProgramcontaining the attribute variable.
- : A
name- : A string specifying the name of the attribute variable whose location to get.
Return value
A GLint number indicating the location of the variable name if found.
Returns -1 otherwise.
Examples
gl.getAttribLocation(program, "vColor");
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.