vispy.visuals.shaders.variable.
InVar
Bases: vispy.visuals.shaders.variable.Variable
vispy.visuals.shaders.variable.Variable
definition
Return the GLSL definition for this object. Use obj_names to determine the names of dependencies, and version (number, qualifier) to adjust code output.
dtype
The type of data (float, int, vec, mat, …).
expression
Return the GLSL expression used to reference this object inline.
value
The value associated with this variable.
Variable
Bases: vispy.visuals.shaders.shader_object.ShaderObject
vispy.visuals.shaders.shader_object.ShaderObject
Representation of global shader variable
the name of the variable. This string can also contain the full definition of the variable, e.g. ‘uniform vec2 foo’.
If given, vtype and dtype are determined automatically. If a float/int/tuple is given, the variable is a uniform. If a gloo object is given that has a glsl_type property, the variable is an attribute and
The type of variable.
The data type of the variable, e.g. ‘float’, ‘vec4’, ‘mat’, etc.
name
The name of this variable.
state_id
Return a unique ID that changes whenever the state of the Variable has changed. This allows ModularProgram to quickly determine whether the value has changed since it was last used.
vtype
The type of variable (const, uniform, attribute, or varying).
For in/out variables (GLSL 150+), vtype is ‘varying’.
Varying
Representation of a varying (variables passed from one shader to the next).
Varyings can inherit their dtype from another Variable, allowing for more flexibility in composing shaders.
invar
Return a varying that defines itself using the same name as this, but as an in variable instead of out.
link
Link this Varying to another object from which it will derive its dtype.
This method is used internally when assigning an attribute to a varying using syntax function[varying] = attr.
function[varying] = attr