Exemple #1
0
 internal void SetUniformArray(string Parameter, Vector3f[] vec3array)
 {
     SFMLShader.SetUniformArray(Parameter, vec3array.Select(v => (Vec3)v).ToArray());
 }
Exemple #2
0
 public void SetUniformArray(string Parameter, Vector3[] vec3array)
 {
     SFMLShader.SetUniformArray(Parameter, vec3array.Select(v => new Vec3(v.X, v.Y, v.Z)).ToArray());
 }
Exemple #3
0
 /// <summary>
 /// Set a parameter on the shader.
 /// </summary>
 /// <param name="name">The parameter in the shader to set.</param>
 /// <param name="x">The first value of a vec4.</param>
 /// <param name="y">The second value of a vec4.</param>
 /// <param name="z">The third value of a vec4.</param>
 /// <param name="w">The fourth value of a vec4.</param>
 public void SetParameter(string name, float x, float y, float z, float w)
 {
     SFMLShader.SetUniformArray(name, new float[] { x, y, z, w });
 }
Exemple #4
0
 /// <summary>
 /// Set a parameter on the shader.
 /// </summary>
 /// <param name="name">The parameter in the shader to set.</param>
 /// <param name="xyzw">A Vector4 to set.</param>
 public void SetParameter(string name, Vector4 xyzw)
 {
     SFMLShader.SetUniformArray(name, new float[] { xyzw.X, xyzw.Y, xyzw.Z, xyzw.W });
 }
Exemple #5
0
 /// <summary>
 /// Set a parameter on the shader.
 /// </summary>
 /// <param name="name">The parameter in the shader to set.</param>
 /// <param name="xyz">A Vector3 to set.</param>
 public void SetParameter(string name, Vector3 xyz)
 {
     SFMLShader.SetUniformArray(name, new float[] { xyz.X, xyz.Y, xyz.Z });
 }
Exemple #6
0
 /// <summary>
 /// Set a parameter on the shader.
 /// </summary>
 /// <param name="name">The parameter in the shader to set.</param>
 /// <param name="xy">A Vector2 to set.</param>
 public void SetParameter(string name, Vector2 xy)
 {
     SFMLShader.SetUniformArray(name, new float[] { xy.X, xy.Y });
 }
Exemple #7
0
 /// <summary>
 /// Set a parameter on the shader.
 /// </summary>
 /// <param name="name">The parameter in the shader to set.</param>
 /// <param name="color">The color to set it to.</param>
 public void SetParameter(string name, Color color)
 {
     SFMLShader.SetUniformArray(name, color.ToArray());
 }