Shader.attr

Set as an attribute.

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

Examples

    // Set variables to glsl attribute named "v".
    float a = 1.0;
float b = 2.0;
float c = 3.0;
shader.setAttrib("v", a, b, c);

Meta