web api instance method
WebGL2RenderingContext: getFragDataLocation() method
Available in workers
The WebGL2RenderingContext.getFragDataLocation() method
of the WebGL 2 API returns the binding of
color numbers to user-defined varying out variables.
Syntax
getFragDataLocation(program, name)
Parameters
program- : A
WebGLProgramto query.
- : A
name- : A string specifying the name of the user-defined varying out variable.
Return value
A GLint indicating the assigned color number binding, or -1
otherwise.
Examples
// program is a linked WebGLProgram
gl.getFragDataLocation(program, "fragColor");
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.