public HighLevelGpuProgram CreateProgram( string name, string group, string language, GpuProgramType type )
{
// lookup the factory for the requested program language
HighLevelGpuProgramFactory factory = GetFactory( language );
if ( factory == null )
{
throw new Exception(
string.Format( "Could not find HighLevelGpuProgramManager that can compile programs of type '{0}'", language ) );
}
// create the high level program using the factory
HighLevelGpuProgram program = factory.CreateInstance( this, name, nextHandle, group, false, null );
program.Type = type;
program.SyntaxCode = language;
_add( program );
return program;
}