Shader.attr

Set as an attribute.

  1. Shader attr(string name, Args v)
  2. Shader attr(string name, Args v)
    class Shader
    attr
    (
    Args...
    )
    (
    in string name
    ,
    Args v
    )
    if (
    Args.length > 0 &&
    !__traits(isArithmetic, Args[0])
    )
  3. Shader attr(string name)
  4. Shader attr(string name, V v)

Examples

    // Set a array to glsl vec2 attribute named "coord2d".
    float[] vertices = [
    0.0,  0.8,
    -0.8, -0.8,
    0.8, -0.8,
    ];
shader.setAttrib("coord2d", vertices);

Meta