Compartir a través de


RuntimeShader.SetColorUniform Method

Definition

Overloads

SetColorUniform(String, Color)

Sets the uniform color value corresponding to this shader.

SetColorUniform(String, ColorObject)

Sets the uniform color value corresponding to this shader.

SetColorUniform(String, Int64)

Sets the uniform color value corresponding to this shader.

SetColorUniform(String, Color)

Sets the uniform color value corresponding to this shader.

[Android.Runtime.Register("setColorUniform", "(Ljava/lang/String;I)V", "GetSetColorUniform_Ljava_lang_String_IHandler", ApiSince=33)]
public virtual void SetColorUniform (string uniformName, Android.Graphics.Color color);
[<Android.Runtime.Register("setColorUniform", "(Ljava/lang/String;I)V", "GetSetColorUniform_Ljava_lang_String_IHandler", ApiSince=33)>]
abstract member SetColorUniform : string * Android.Graphics.Color -> unit
override this.SetColorUniform : string * Android.Graphics.Color -> unit

Parameters

uniformName
String

name matching the color uniform declared in the AGSL shader program

color
Color

the provided sRGB color will be transformed into the shader program's output colorspace and will be available as a vec4 uniform in the program.

Attributes

Remarks

Sets the uniform color value corresponding to this shader. If the shader does not have a uniform with that name or if the uniform is declared with a type other than vec3 or vec4 and corresponding layout(color) annotation then an IllegalArgumentException is thrown.

Java documentation for android.graphics.RuntimeShader.setColorUniform(java.lang.String, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

SetColorUniform(String, ColorObject)

Sets the uniform color value corresponding to this shader.

[Android.Runtime.Register("setColorUniform", "(Ljava/lang/String;Landroid/graphics/Color;)V", "GetSetColorUniform_Ljava_lang_String_Landroid_graphics_Color_Handler", ApiSince=33)]
public virtual void SetColorUniform (string uniformName, Android.Graphics.ColorObject color);
[<Android.Runtime.Register("setColorUniform", "(Ljava/lang/String;Landroid/graphics/Color;)V", "GetSetColorUniform_Ljava_lang_String_Landroid_graphics_Color_Handler", ApiSince=33)>]
abstract member SetColorUniform : string * Android.Graphics.ColorObject -> unit
override this.SetColorUniform : string * Android.Graphics.ColorObject -> unit

Parameters

uniformName
String

name matching the color uniform declared in the AGSL shader program

color
ColorObject

the provided sRGB color will be transformed into the shader program's output colorspace and will be available as a vec4 uniform in the program.

Attributes

Remarks

Sets the uniform color value corresponding to this shader. If the shader does not have a uniform with that name or if the uniform is declared with a type other than vec3 or vec4 and corresponding layout(color) annotation then an IllegalArgumentException is thrown.

Java documentation for android.graphics.RuntimeShader.setColorUniform(java.lang.String, android.graphics.Color).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

SetColorUniform(String, Int64)

Sets the uniform color value corresponding to this shader.

[Android.Runtime.Register("setColorUniform", "(Ljava/lang/String;J)V", "GetSetColorUniform_Ljava_lang_String_JHandler", ApiSince=33)]
public virtual void SetColorUniform (string uniformName, long color);
[<Android.Runtime.Register("setColorUniform", "(Ljava/lang/String;J)V", "GetSetColorUniform_Ljava_lang_String_JHandler", ApiSince=33)>]
abstract member SetColorUniform : string * int64 -> unit
override this.SetColorUniform : string * int64 -> unit

Parameters

uniformName
String

name matching the color uniform declared in the AGSL shader program

color
Int64

the provided sRGB color will be transformed into the shader program's output colorspace and will be available as a vec4 uniform in the program.

Attributes

Remarks

Sets the uniform color value corresponding to this shader. If the shader does not have a uniform with that name or if the uniform is declared with a type other than vec3 or vec4 and corresponding layout(color) annotation then an IllegalArgumentException is thrown.

Java documentation for android.graphics.RuntimeShader.setColorUniform(java.lang.String, long).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to