Generates an array-like declaration, as a GLSL syntax string compatible with versions 1-3.

Works around the lack of const arrays in GLSL < 3. Used as the base for the other GLSL version list types, ensuring a common standard while offering further language features where available.

  • Parameters

    • type: string

      The GLSL list data-type.

    • name: string

      The name of the GLSL list variable.

    • a: array<number, number[]>

      The list of GLSL values.

    • Optionalqualify: string = ''

      A GLSL qualifier, if needed.

    • Optionalinit: string = type

      A data-type initialiser, type by default.

    Returns string

    The GLSL1 array-like declaration string.