pub struct ShaderArgsBuilder { /* private fields */ }
Expand description
An object to build the uniforms data for a GLShader
.
GLib type: Shared boxed type with reference counted clone semantics.
Implementations§
Source§impl ShaderArgsBuilder
impl ShaderArgsBuilder
Sourcepub fn as_ptr(&self) -> *mut GskShaderArgsBuilder
pub fn as_ptr(&self) -> *mut GskShaderArgsBuilder
Return the inner pointer to the underlying C value.
Sourcepub unsafe fn from_glib_ptr_borrow(ptr: &*mut GskShaderArgsBuilder) -> &Self
pub unsafe fn from_glib_ptr_borrow(ptr: &*mut GskShaderArgsBuilder) -> &Self
Borrows the underlying C value.
Source§impl ShaderArgsBuilder
impl ShaderArgsBuilder
Sourcepub fn new(
shader: &GLShader,
initial_values: Option<&Bytes>,
) -> ShaderArgsBuilder
👎Deprecated: Since 4.16
pub fn new( shader: &GLShader, initial_values: Option<&Bytes>, ) -> ShaderArgsBuilder
Allocates a builder that can be used to construct a new uniform data chunk.
§Deprecated since 4.16
GTK’s new Vulkan-focused rendering does not support this feature. Use GtkGLArea for OpenGL rendering.
§shader
a GLShader
§initial_values
optional GBytes
with initial values
§Returns
The newly allocated builder, free with
Gsk::ShaderArgsBuilder::unref()
Sourcepub fn to_args(self) -> Bytes
👎Deprecated: Since 4.16
pub fn to_args(self) -> Bytes
Creates a new GBytes
args from the current state of the
given @self.
Any uniforms of the shader that have not been explicitly set on the @self are zero-initialized.
The given ShaderArgsBuilder
is reset once this function returns;
you cannot call this function multiple times on the same @self instance.
This function is intended primarily for bindings. C code should use
Gsk::ShaderArgsBuilder::free_to_args()
.
§Deprecated since 4.16
GTK’s new Vulkan-focused rendering does not support this feature. Use GtkGLArea for OpenGL rendering.
§Returns
the newly allocated buffer with all the args added to @self
Trait Implementations§
Source§impl Clone for ShaderArgsBuilder
impl Clone for ShaderArgsBuilder
Source§impl Debug for ShaderArgsBuilder
impl Debug for ShaderArgsBuilder
Source§impl From<ShaderArgsBuilder> for Value
impl From<ShaderArgsBuilder> for Value
Source§fn from(s: ShaderArgsBuilder) -> Self
fn from(s: ShaderArgsBuilder) -> Self
Source§impl HasParamSpec for ShaderArgsBuilder
impl HasParamSpec for ShaderArgsBuilder
type ParamSpec = ParamSpecBoxed
Source§type SetValue = ShaderArgsBuilder
type SetValue = ShaderArgsBuilder
type BuilderFn = fn(_: &str) -> ParamSpecBoxedBuilder<'_, ShaderArgsBuilder>
fn param_spec_builder() -> Self::BuilderFn
Source§impl Hash for ShaderArgsBuilder
impl Hash for ShaderArgsBuilder
Source§impl Ord for ShaderArgsBuilder
impl Ord for ShaderArgsBuilder
Source§fn cmp(&self, other: &ShaderArgsBuilder) -> Ordering
fn cmp(&self, other: &ShaderArgsBuilder) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for ShaderArgsBuilder
impl PartialEq for ShaderArgsBuilder
Source§impl PartialOrd for ShaderArgsBuilder
impl PartialOrd for ShaderArgsBuilder
Source§impl StaticType for ShaderArgsBuilder
impl StaticType for ShaderArgsBuilder
Source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Eq for ShaderArgsBuilder
impl StructuralPartialEq for ShaderArgsBuilder
Auto Trait Implementations§
impl Freeze for ShaderArgsBuilder
impl RefUnwindSafe for ShaderArgsBuilder
impl !Send for ShaderArgsBuilder
impl !Sync for ShaderArgsBuilder
impl Unpin for ShaderArgsBuilder
impl UnwindSafe for ShaderArgsBuilder
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)