FreeMat
|
Section: Visualization Toolkit Rendering Classes
vtkGLSLShaderProgram is a concerete implementation of vtkShaderProgram. It's main function is to 'Link' a vertex and a fragment shader together and install them into the rendering pipeline by calling OpenGL2.0.
Initialization of shader parameters is delegated to instances of vtkShader (vtkGLSLShader in this case). .SECTION Thanks Shader support in VTK includes key contributions by Gary Templet at Sandia National Labs.
To create an instance of class vtkGLSLShaderProgram, simply invoke its constructor as follows
obj = vtkGLSLShaderProgram
The class vtkGLSLShaderProgram has several methods that can be used. They are listed below. Note that the documentation is translated automatically from the VTK sources, and may not be completely intelligible. When in doubt, consult the VTK website. In the methods listed below, obj
is an instance of the vtkGLSLShaderProgram class.
string = obj.GetClassName ()
int = obj.IsA (string name)
vtkGLSLShaderProgram = obj.NewInstance ()
vtkGLSLShaderProgram = obj.SafeDownCast (vtkObject o)
obj.Render (vtkActor actor, vtkRenderer renderer)
obj.PostRender (vtkActor , vtkRenderer )
- Called to unload the shaders after the actor has been rendered. obj.ReleaseGraphicsResources (vtkWindow )
- Release any graphics resources that are being consumed by this actor. The parameter window could be used to determine which graphic resources to release. int = obj.GetProgram ()