pub fn new(hook: SnippetHook, declarations: &str, post: &str) -> Snippet {
        unsafe {
            from_glib_full(ffi::cogl_snippet_new(
                hook.to_glib(),
                declarations.to_glib_none().0,
                post.to_glib_none().0,
            ))
        }
    }
/// Allocates and initializes a new snippet with the given source strings.
/// ## `hook`
/// The point in the pipeline that this snippet will wrap around
///  or replace.
/// ## `declarations`
/// The source code for the declarations for this
///  snippet or `None`. See `Snippet::set_declarations`.
/// ## `post`
/// The source code to run after the hook point where this
///  shader snippet is attached or `None`. See `Snippet::set_post`.
///
/// # Returns
///
/// a pointer to a new `Snippet`
Allocates and initializes a new snippet with the given source strings.
Allocates and initializes a new snippet with the given source strings .
pub fn new(hook: SnippetHook, declarations: &str, post: &str) -> Snippet {
        unsafe {
            from_glib_full(ffi::cogl_snippet_new(
                hook.to_glib(),
                declarations.to_glib_none().0,
                post.to_glib_none().0,
            ))
        }
    }
pub fn new ( hook : SnippetHook , declarations : & str , post : & str ) -> Snippet { unsafe { from_glib_full ( ffi :: cogl_snippet_new ( hook . to_glib ( ) , declarations . to_glib_none ( ) . 0 , post . to_glib_none ( ) . 0 , ) ) } }
Allocates and initializes a new snippet with the given source strings.
Allocates and initializes a new snippet with the given source strings .
hook
SnippetHook
declarations
&str
post
&str
a pointer to a new `Snippet`
a pointer to a new ` Snippet `
hook
SnippetHook
declarations
&str
post
&str
`hook`
The point in the pipeline that this snippet will wrap around
or replace.
The point in the pipeline that this snippet will wrap around or replace .
`declarations`
The source code for the declarations for this
snippet or `None`. See `Snippet::set_declarations`.
The source code for the declarations for this snippet or ` None ` . See ` Snippet :: set_declarations ` .
`post`
The source code to run after the hook point where this
shader snippet is attached or `None`. See `Snippet::set_post`.
The source code to run after the hook point where this shader snippet is attached or ` None ` . See ` Snippet :: set_post ` .