BasicProgram Class Reference

Class representing a basic program. More...

Inheritance diagram for BasicProgram:
ShaderProgram

List of all members.

Public Member Functions

 BasicProgram (BasicParameters parameters=null)
 Creates a program.
 BasicProgram (string vpFileName, string fpFileName=null, BasicParameters parameters=null)
 Creates a program (from a file)
override Object ShallowClone ()
 Creates a copy of a program.
new void Dispose ()
 Frees the unmanaged resources of the program.

Protected Member Functions

 BasicProgram (BasicProgram program)
 Creates a copy of a program.
override void UpdateShader ()
 Updates the shader state.

Properties

BasicParameters Parameters [get, set]
 Parameters.

Detailed Description

Class representing a basic program.


Constructor & Destructor Documentation

BasicProgram ( BasicParameters  parameters = null)

Creates a program.

Parameters:
parametersParameters (creates new when null)
BasicProgram ( string  vpFileName,
string  fpFileName = null,
BasicParameters  parameters = null 
)

Creates a program (from a file)

Parameters:
vpFileNameVertex shader filename
fpFileNameFilename of the fragment shader (vpFileName used when NULL)
parametersParameters (creates new when null)

Creates a shader program from a specified file. The usable file format is CGX. The shader to be specified must be compatible to the existing shader included in the HighLevel.Model source code, and have the same uniform and attribute variables declared.

BasicProgram ( BasicProgram  program) [protected]

Creates a copy of a program.

Parameters:
programProgram

Creates a copy of the program. The 2 programs will then share unmanaged resources. When Dispose() is called for all copies, the shared unmanaged resources will be freed.


Member Function Documentation

override Object ShallowClone ( ) [virtual]

Creates a copy of a program.

Returns:
Program copy

Creates a copy of the program. The 2 programs will then share unmanaged resources. When Dispose() is called for all copies, the shared unmanaged resources will be freed.

Reimplemented from ShaderProgram.

override void UpdateShader ( ) [protected, virtual]

Updates the shader state.

A virtual function that is called from the graphics context before primitive rendering. This function is used when a cached state in a class is applied to the shader.

Reimplemented from ShaderProgram.