public UniformParameter(GpuProgramParameters.AutoConstantType autoConstantType, int autoConstantData, int size) : base( Parameter.AutoParameters[autoConstantType].Type, Parameter.AutoParameters[autoConstantType].Name, SemanticType.Unknown, -1, ContentType.Unknown, size) { AutoShaderParameter parameterDef = Parameter.AutoParameters[autoConstantType]; _name = parameterDef.Name; if (autoConstantData != 0) { _name += autoConstantData.ToString(); } _type = parameterDef.Type; _semantic = SemanticType.Unknown; _index = -1; _content = Parameter.ContentType.Unknown; this.isAutoConstantInt = true; this.isAutoConstantReal = false; this.autoConstantType = autoConstantType; this.autoConstantIntData = autoConstantData; this.variability = (int)GpuProgramParameters.GpuParamVariability.Global; this._params = null; this.physicalIndex = -1; _size = size; }
public UniformParameter(GpuProgramParameters.AutoConstantType autoConstantType, Real autoConstantData, int size, GpuProgramParameters.GpuConstantType type) : base( Parameter.AutoParameters[autoConstantType].Type, Parameter.AutoParameters[autoConstantType].Name, SemanticType.Unknown, -1, ContentType.Unknown, size) { AutoShaderParameter parameterDef = Parameter.AutoParameters[autoConstantType]; _name = parameterDef.Name; if (autoConstantData != 0.0) { _name += autoConstantData.ToString(); //replace possible illegal point character in name _name = _name.Replace('.', '_'); } _type = type; _semantic = SemanticType.Unknown; _index = -1; _content = Parameter.ContentType.Unknown; this.isAutoConstantReal = true; this.isAutoConstantInt = false; this.autoConstantType = autoConstantType; this.autoConstantRealData = autoConstantData; this.variability = (int)GpuProgramParameters.GpuParamVariability.Global; this._params = null; this.physicalIndex = -1; _size = size; }