protected void _updateParameter( GpuProgramParameters programParameters, String paramName, Object value, int sizeInBytes ) { programParameters.AutoAddParamName = true; if ( value is Axiom.Math.Matrix4 ) { programParameters.SetConstant( programParameters.GetParamIndex( paramName ), (Axiom.Math.Matrix4)value ); } else if ( value is Axiom.Core.ColorEx ) { programParameters.SetConstant( programParameters.GetParamIndex( paramName ), (Axiom.Core.ColorEx)value ); } else if ( value is Axiom.Math.Vector3 ) { programParameters.SetConstant( programParameters.GetParamIndex( paramName ), ( (Axiom.Math.Vector3)value ) ); } else if ( value is Axiom.Math.Vector4 ) { programParameters.SetConstant( programParameters.GetParamIndex( paramName ), (Axiom.Math.Vector4)value ); } else if ( value is float[] ) { programParameters.SetConstant( programParameters.GetParamIndex( paramName ), (float[])value ); } else if ( value is int[] ) { programParameters.SetConstant( programParameters.GetParamIndex( paramName ), (int[])value ); } else if ( value is float ) { programParameters.SetConstant( programParameters.GetParamIndex( paramName ), new float[] { (float)value, 0.0f, 0.0f, 0.0f } ); } else { programParameters.SetConstant( programParameters.GetParamIndex( paramName ), (float[])value ); } }