Firefox Tomorrow

web api instance method

WebGLRenderingContext: getAttribLocation() method

View on MDN ↗

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
  • 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.

See also