Shader

class Shader[source]

Bases: object

The shader used by the OpenGL view.

Methods

bind

Bind the shader program.

bind_attribute

Bind a named attribute to a buffer.

disable_attribute

draw_2d_box

Draw a 2D box.

draw_arrows

Draw arrows.

draw_lines

Draw lines.

draw_points

Draw points.

draw_texts

Draw texts.

draw_triangles

Draw triangles.

enable_attribute

Enable a named attribute in the shader program.

release

Release (unbind) the shader program.

uniform1f

Store a uniform float in the shader program at a named location.

uniform1i

Store a uniform integer in the shader program at a named location.

uniform3f

Store a uniform list of 3 floats in the shader program at a named location.

uniform4x4

Store a uniform 4x4 transformation matrix in the shader program at a named location.

uniformText

Store a uniform texture in the shader program at a named location.