Uranium
Application Framework
UM.View.GL.ShaderProgram.ShaderProgram Class Reference

Public Member Functions

def __init__ (self)
 
def load
 
def setVertexShader
 
def setFragmentShader
 
def setGeometryShader
 
def build (self)
 
def setUniformValue
 
def setTexture
 
def enableAttribute
 
def disableAttribute
 
def bind (self)
 
def release (self)
 
def addBinding
 
def removeBinding
 
def updateBindings (self, kwargs)
 
def addAttributeBinding
 
def removeAttributeBinding
 

Detailed Description

An abstract class for dealing with shader programs.

This class provides an interface an some basic elements for dealing with
shader programs. Shader programs are described in a simple text file
based on the Python configparser module. These files contain the shaders
for the different shader program stages, in addition to defaults that should
be used for uniform values and uniform and attribute bindings.

Member Function Documentation

def UM.View.GL.ShaderProgram.ShaderProgram.bind (   self,
  None 
)
Bind the shader to use it for rendering.
def UM.View.GL.ShaderProgram.ShaderProgram.build (   self,
  None 
)
Build the complete shader program out of the separately provided sources.
def UM.View.GL.ShaderProgram.ShaderProgram.release (   self,
  None 
)
Release the shader so it will no longer be used for rendering.
def UM.View.GL.ShaderProgram.ShaderProgram.updateBindings (   self,
  kwargs,
  None 
)
Update the values of bindings.

:param kwargs: Keyword arguments.
Each key should correspond to a binding name, with the
value being the value of the uniform.

:note By default, these values are not cached as they are expected to be continuously
updated.

The documentation for this class was generated from the following file: