shaderdef¶
shaderdef.shader module¶
-
class
shaderdef.shader.ShaderDef(vert_shader, frag_shader, geom_shader=None)[source]¶ Bases:
object-
add_function(function)[source]¶ Add a utility function to the shader program.
Each utility function is currently emitted in all shader stages regardless of which stage or stages the function is actually used in.
-
frag_shader¶ Get the GLSL code for the fragment shader.
-
geom_shader¶ Get the GLSL code for the geometry shader.
-
vert_shader¶ Get the GLSL code for the vertex shader.
-
shaderdef.glsl_var module¶
-
class
shaderdef.glsl_var.GlslVar(name, gtype, interpolation=None)[source]¶ Bases:
objectRepresent a GLSL variable declaration (or struct member).
-
gtype= Attribute(name='gtype', default=NOTHING, validator=None, repr=True, cmp=True, hash=True, init=True, convert=None)¶
-
interpolation= Attribute(name='interpolation', default=None, validator=None, repr=True, cmp=True, hash=True, init=True, convert=None)¶
-
name= Attribute(name='name', default=NOTHING, validator=None, repr=True, cmp=True, hash=True, init=True, convert=None)¶
-
shaderdef.interface module¶
-
class
shaderdef.interface.GlGsIn(**kwargs)[source]¶ Bases:
shaderdef.interface.ShaderInterface-
gl_position¶
-
shaderdef.glsl_funcs module¶
shaderdef.glsl_types module¶
-
class
shaderdef.glsl_types.ArraySpec(element_type, length)[source]¶ Bases:
objectRepresents an array declaration.
This type isn’t currently intended to be used by client code directly, it’s just a convenient form for internal use.
-
element_type= Attribute(name='element_type', default=NOTHING, validator=None, repr=True, cmp=True, hash=True, init=True, convert=None)¶
-
classmethod
from_ast_node(node)[source]¶ Create a GlslArray from an AST node if possible.
If the node cannot be converted then None is returned.
-
length= Attribute(name='length', default=NOTHING, validator=None, repr=True, cmp=True, hash=True, init=True, convert=None)¶
-