Skip to main content
`Ctrl`+`K`

# vispy.visuals.shaders.program module

class vispy.visuals.shaders.program.ModularProgram(vcode='', fcode='', gcode=None)

  Bases: `Program`

  Shader program using Function instances as basis for its shaders.

  Automatically rebuilds program when functions have changed and uploads program variables.

  build_if_needed()

    Reset shader source if necesssary.

  draw(*args, **kwargs)

    Draw the attribute arrays in the specified mode.

    Parameters:
      mode str | GL_ENUM

        ‘points’, ‘lines’, ‘line_strip’, ‘line_loop’, ‘lines_adjacency’, ‘line_strip_adjacency’, ‘triangles’, ‘triangle_strip’, or ‘triangle_fan’.

      indices array

        Array of indices to draw.

      check_error:

        Check error after draw.

  property frag
  property geom
  update_variables()
  property vert