vispy.visuals.shaders.program module

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

Bases: vispy.gloo.program.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()[source]

Reset shader source if necesssary.

draw(*args, **kwargs)[source]

Draw the attribute arrays in the specified mode.

Parameters
modestr | GL_ENUM

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

indicesarray

Array of indices to draw.

check_error:

Check error after draw.

property frag
property geom
update_variables()[source]
property vert