Skip to main content
Module

x/shader_canvas/core/webgl_programs/create_program.ts>CreateProgram#updateLocations

A rendering engine where you can write WebGL 2.0 shaders using custom tags.
Latest
method CreateProgram.prototype.updateLocations
import { CreateProgram } from "https://deno.land/x/shader_canvas@v1.1.1/core/webgl_programs/create_program.ts";

This functions reads each vertex attribute location of this program and puts it in the attribute locations Map attribLocations provided as argument.

If the location already exists, it is assume that its location remains the same (this means that multiple programs must share the same locations for each vertex attribute).

The attribLocations Map is changed. This is not a pure function.

Parameters

gl: WebGL2RenderingContext
optional
attribLocations: Map<string, number> = [UNSUPPORTED]