Firefox Tomorrow

web api instance method

WebGLRenderingContext: getAttachedShaders() method

View on MDN ↗

Available in workers

The WebGLRenderingContext.getAttachedShaders() method of the WebGL API returns a list of WebGLShader objects attached to a WebGLProgram.

Syntax

getAttachedShaders(program)

Parameters

  • program

Return value

An Array of WebGLShader objects that are attached to the given WebGLProgram.

Examples

const program = gl.createProgram();

// Attach pre-existing shaders
gl.attachShader(program, vertexShader);
gl.attachShader(program, fragmentShader);
gl.linkProgram(program);

gl.getAttachedShaders(program);

Specifications

SpecificationsStandards references are available on the canonical MDN page.

Browser compatibility

Browser compatibilityCompatibility data is available on the canonical MDN page.

See also