Trait animate::ShaderEffectExt[][src]

pub trait ShaderEffectExt: 'static {
    fn set_shader_source(&self, source: &str) -> bool;
fn set_uniform_value(&self, name: &str, value: &Value); }

Trait containing all ShaderEffect methods.

Implementors

ShaderEffect

Required methods

fn set_shader_source(&self, source: &str) -> bool[src]

Sets the source of the GLSL shader used by self

This function should only be called by implementations of the ShaderEffect class, and not by application code.

This function can only be called once; subsequent calls will yield no result.

source

the source of a GLSL shader

Returns

true if the source was set

fn set_uniform_value(&self, name: &str, value: &Value)[src]

Sets value as the payload for the uniform name inside the shader effect

The glib::Type of the value must be one of: G_TYPE_INT, for a single integer value; G_TYPE_FLOAT, for a single floating point value; TYPE_SHADER_INT, for an array of integer values; TYPE_SHADER_FLOAT, for an array of floating point values; and TYPE_SHADER_MATRIX, for a matrix of floating point values. It also accepts G_TYPE_DOUBLE for compatibility with other languages than C.

name

the name of the uniform to set

value

a gobject::Value with the value of the uniform to set

Loading content...

Implementors

impl<O: IsA<ShaderEffect>> ShaderEffectExt for O[src]

Loading content...