public GpuConstantDefinition FindNamedConstantDefinition(string name, bool throwExceptionIfNotFound)
{
if (namedParams == null)
{
if (throwExceptionIfNotFound)
throw new AxiomException( "Named constants have not been initialised, perhaps a compile error." );
return null;
}
int value;
if (!namedParams.TryGetValue( name, out value ))
{
if (throwExceptionIfNotFound)
throw new AxiomException( "Parameter called " + name + " does not exist. " );
return null;
}
//else
{
// temp hack (gotta update this mess)
var def = new GpuConstantDefinition();
def.LogicalIndex = value;
def.PhysicalIndex = value;
return def;
//return &(i->second);
}
}
}