Shader.uniform

Set matrix to uniform.

  1. Shader uniform(string name, V v)
  2. Shader uniform(string name, M m)
    class Shader
    uniform
    (
    M
    )
    (
    in string name
    ,
    M m
    )
    if (
    isMatrix!(M) &&
    M.rowSize <= 4
    &&
    M.colSize <= 4
    )
  3. Shader uniform(string name, Args v)
  4. Shader uniform(string name, Args v)

Examples

    auto m = ar.Matrix!(float, 3, 3)(
            [0, 0, 0], 
            [0, 0, 0], 
            [0, 0, 0], 
            );
shader.setUniform("m", m);

Meta