public override void TakeOverParameterValue(ShaderParameter otherParameter) { if (GetParamType() == otherParameter.GetParamType()) { d_parameterValue = ((ShaderParameterFloat)otherParameter).d_parameterValue; } }
public override bool Equal(ShaderParameter otherParameter) { if (GetParamType() == otherParameter.GetParamType()) { return(d_parameterValue == ((ShaderParameterFloat)otherParameter).d_parameterValue); } return(false); }
/// <summary> /// Adds a new shader parameter to the parameter bindings. If an old one exists it will be /// deleted and replaced by the new one. /// </summary> /// <param name="parameter_name"> /// The name of the parameter as used by the shader /// </param> /// <param name="shader_parameter"> /// The pointer to the shader_parameter /// </param> protected void SetNewParameter(string parameter_name, ShaderParameter shader_parameter) { if (d_shaderParameterBindings.ContainsKey(parameter_name)) { // TODO: d_shaderParameterBindings[parameter_name].Dispose(); // delete found_iterator->second; d_shaderParameterBindings[parameter_name] = shader_parameter; } else { d_shaderParameterBindings.Add(parameter_name, shader_parameter); } }
/// <summary> /// Copies the parameter value from the passed ShaderParameter to this /// one if the classes are of the same type. /// </summary> /// <param name="otherParameter"> /// The ShaderParameter from which the parameter value should be taken over. /// </param> public abstract void TakeOverParameterValue(ShaderParameter otherParameter);
/// <summary> /// Checks if the ShaderParameters are equal, depending on their type /// and parameter. /// </summary> /// <param name="otherParameter"></param> /// <returns> /// True if the ShaderParameters are equal. /// </returns> public abstract bool Equal(ShaderParameter otherParameter);
public override void TakeOverParameterValue(ShaderParameter otherParameter) { throw new NotImplementedException(); }
public override bool Equal(ShaderParameter otherParameter) { throw new NotImplementedException(); }