Macro miniquad

Source
macro_rules! miniquad {
    (
    /* buffers */

    // Creates a vertex buffer resource object.
    new_vertices($ctx:expr, $(BufferUsage::)?$usage:ident, $vertices:expr)) => { ... };
    (
    // Creates an index buffer resource object.
    new_indices($ctx:expr, $usage:ident, $indices:expr)) => { ... };
    (
    // Creates both a vertex and index buffer resource objects.
    new_vertices_indices($ctx:expr, $usage:ident, $vertices:expr, $indices:expr)) => { ... };
    (
    /* shaders */

    // Creates a OpenGL shader buffer resource object.
    new_shader_glsl($ctx:expr, $vertex:expr, $fragment:expr, $meta:expr)) => { ... };
    (
    // Creates a Metal shader buffer resource object.
    new_shader_msl($ctx:expr, $msl:expr, $meta:expr)) => { ... };
    (
    // Creates a Glsl or Metal shader buffer resource object, depending on the backend.
    new_shader($ctx:expr, $vertex:expr, $fragment:expr, $msl:expr, $meta:expr)) => { ... };
    (
    /* bindings */

    // Constructs Bindings.
    bindings($vertex_buffers:expr, $index_buffer:expr, $images:expr) ) => { ... };
}
Available on crate feature dep_miniquad only.
Expand description

A macro for namespaced miniquad operations.

§Arms