Package rats :: Module glsl :: Class ShaderProgram
[hide private]
[frames] | no frames]

Class ShaderProgram

source code

object --+
         |
        ShaderProgram

Manages GLSL programs.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
checkExtensions(self, extensions)
Checks if all extensions in a list are present.
source code
 
_checkOpenGLError(self)
Checks if there are OpenGL error messages.
source code
 
reset(self)
Disables and removes all shader programs.
source code
 
addShader(self, shaderType, fileName)
Reads a shader program from a file.
source code
 
add_shader_text(self, shaderType, sourceString)
Loads a program from string and compiles it.
source code
 
linkShaders(self)
Links compiled shader programs.
source code
 
enable(self)
Activates shader programs.
source code
 
disable(self)
De-activates shader programs.
source code
 
indexOfUniformVariable(self, variableName)
Finds the index of a uniform variable.
source code
 
indexOfVertexAttribute(self, attributeName)
Finds the index of an attribute variable.
source code
 
isEnabled(self) source code
 
glUniform3f(self, variable_name, a, b, c) source code
 
glUniform1f(self, variable_name, a) source code
 
glUniform1i(self, variable_name, a) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

addShader(self, shaderType, fileName)

source code 

Reads a shader program from a file.

The program is loaded and compiled.