Struct gstreamer_gl::GLShader[][src]

pub struct GLShader(_);
Expand description

Implementations

Note: must be called in the GL thread

context

a GLContext

Returns

a new empty shader

Note: must be called in the GL thread

context

a GLContext

Returns

a default shader or None on failure

Attaches stage to self. stage must have been successfully compiled with GLSLStage::compile().

Note: must be called in the GL thread

stage

a GLSLStage to attach

Returns

whether stage could be attached to self

Attaches stage to self. stage must have been successfully compiled with GLSLStage::compile().

Note: must be called in the GL thread

stage

a GLSLStage to attach

Returns

whether stage could be attached to self

Bind attribute name to the specified location index using glBindAttributeLocation().

index

attribute index to set

name

name of the attribute

Bind attribute name to the specified location index using glBindFragDataLocation().

index

attribute index to set

name

name of the attribute

Compiles stage and attaches it to self.

Note: must be called in the GL thread

stage

a GLSLStage to attach

Returns

whether stage could be compiled and attached to self

Detaches stage from self. stage must have been successfully attached to self with attach() or attach_unlocked().

Note: must be called in the GL thread

stage

a GLSLStage to attach

Detaches stage from self. stage must have been successfully attached to self with attach() or attach_unlocked().

Note: must be called in the GL thread

stage

a GLSLStage to attach

name

name of the attribute

Returns

the attribute index for name in self or -1 on failure

Returns

the GL program handle for this shader

Note: must be called in the GL thread

Returns

whether self has been successfully linked

Links the current list of GLSLStage’s in self.

Note: must be called in the GL thread

Returns

whether self could be linked together.

Releases the shader and stages.

Note: must be called in the GL thread

Releases the shader and stages.

Note: must be called in the GL thread

Perform glUniform1f() for name on self

name

name of the uniform

value

value to set

Perform glUniform1fv() for name on self

name

name of the uniform

value

values to set

Perform glUniform1i() for name on self

name

name of the uniform

value

value to set

Perform glUniform1iv() for name on self

name

name of the uniform

value

values to set

Perform glUniform2f() for name on self

name

name of the uniform

v0

first value to set

v1

second value to set

Perform glUniform2fv() for name on self

name

name of the uniform

value

values to set

Perform glUniform2i() for name on self

name

name of the uniform

v0

first value to set

v1

second value to set

Perform glUniform2iv() for name on self

name

name of the uniform

value

values to set

Perform glUniform3f() for name on self

name

name of the uniform

v0

first value to set

v1

second value to set

v2

third value to set

Perform glUniform3fv() for name on self

name

name of the uniform

value

values to set

Perform glUniform3i() for name on self

name

name of the uniform

v0

first value to set

v1

second value to set

v2

third value to set

Perform glUniform3iv() for name on self

name

name of the uniform

value

values to set

Perform glUniform4f() for name on self

name

name of the uniform

v0

first value to set

v1

second value to set

v2

third value to set

v3

fourth value to set

Perform glUniform4fv() for name on self

name

name of the uniform

value

values to set

Perform glUniform4i() for name on self

name

name of the uniform

v0

first value to set

v1

second value to set

v2

third value to set

v3

fourth value to set

Perform glUniform4iv() for name on self

name

name of the uniform

value

values to set

This is supported on crate feature v1_16 only.

context

a GLContext

version

a GLSLVersion

profile

a GLSLProfile

Returns

a passthrough shader string for copying an input external-oes texture to the output

This is supported on crate feature v1_16 only.

context

a GLContext

version

a GLSLVersion

profile

a GLSLProfile

Returns

a passthrough shader string for copying an input texture to the output

This is supported on crate feature v1_16 only.

Generates a shader string that defines the precision of float types in GLSL shaders. This is particularly needed for fragment shaders in a GLSL ES context where there is no default precision specified.

Practically, this will return the string ‘precision mediump float’ or ‘precision highp float’ depending on if high precision floats are determined to be supported.

context

a GLContext

version

a GLSLVersion

profile

a GLSLProfile

Returns

a shader string defining the precision of float types based on context, version and profile

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Feeds this value into the given Hasher. Read more

Feeds a slice of this type into the given Hasher. Read more

This method returns an Ordering between self and other. Read more

Compares and returns the maximum of two values. Read more

Compares and returns the minimum of two values. Read more

Restrict a value to a certain interval. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

Returns the type identifier of Self.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Upcasts an object to a superclass or interface T. Read more

Upcasts an object to a reference of its superclass or interface T. Read more

Tries to downcast to a subclass or interface implementor T. Read more

Tries to downcast to a reference of its subclass or interface implementor T. Read more

Tries to cast to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while downcast and upcast will do many checks at compile-time already. Read more

Tries to cast to reference to an object of type T. This handles upcasting, downcasting and casting between interface and interface implementors. All checks are performed at runtime, while downcast and upcast will do many checks at compile-time already. Read more

Casts to T unconditionally. Read more

Casts to &T unconditionally. Read more

Performs the conversion.

Attach the ControlBinding to the object. If there already was a ControlBinding for this property it will be replaced. Read more

A default error function that uses g_printerr() to display the error message and the optional debug string.. Read more

Gets the corresponding ControlBinding for the property. This should be unreferenced again after use. Read more

Obtain the control-rate for this self. Audio processing Element objects will use this rate to sub-divide their processing loop and call sync_values() in between. The length of the processing segment should be up to control-rate nanoseconds. Read more

Returns a copy of the name of self. Caller should g_free() the return value after usage. For a nameless object, this returns None, which you can safely g_free() as well. Read more

Returns the parent of self. This function increases the refcount of the parent object so you should gst_object_unref() it after usage. Read more

Generates a string describing the path of self in the object hierarchy. Only useful (or used) for debugging. Read more

Gets the value for the given controlled property at the requested time. Read more

Performs the conversion.

Returns true if the object is an instance of (can be cast to) T.

Safety Read more

Safety Read more

Safety Read more

Safety Read more

Safety Read more

Safety Read more

Same as connect but takes a SignalId instead of a signal name.

Same as connect_local but takes a SignalId instead of a signal name.

Same as connect_unsafe but takes a SignalId instead of a signal name.

Emit signal by signal id.

Emit signal with details by signal id.

Emit signal by it’s name.

Same as emit but takes Value for the arguments.

Same as emit_by_name but takes Value for the arguments.

Same as emit_with_details but takes Value for the arguments.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

Returns a SendValue clone of self.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.