fn write_fns<W>(registry: &Registry, dest: &mut W) -> io::Result<()>
where
    W: io::Write,
{
    for cmd in &registry.cmds {
        if let Some(v) = registry.aliases.get(&cmd.proto.ident) {
            writeln!(dest, "/// Fallbacks: {}", v.join(", "))?;
        }

        writeln!(dest,
            "#[allow(non_snake_case, unused_variables, dead_code)] #[inline]
            pub unsafe fn {name}({params}) -> {return_suffix} {{ \
                __gl_imports::mem::transmute::<_, extern \"system\" fn({typed_params}) -> {return_suffix}>\
                    (storage::{name}.f)({idents}) \
            }}",
            name = cmd.proto.ident,
            params = super::gen_parameters(cmd, true, true).join(", "),
            typed_params = super::gen_parameters(cmd, false, true).join(", "),
            return_suffix = cmd.proto.ty,
            idents = super::gen_parameters(cmd, true, false).join(", "),
        )?;
    }

    Ok(())
}
/// Creates the functions corresponding to the GL commands.
///
/// The function calls the corresponding function pointer stored in the `storage` module created
///  by `write_ptrs`.
Creates the functions corresponding to the GL commands.
The function calls the corresponding function pointer stored in the `storage` module created
by `write_ptrs`.
Creates the functions corresponding to the GL commands . The function calls the corresponding function pointer stored in the ` storage ` module created by ` write_ptrs ` .
fn write_fns<W>(registry: &Registry, dest: &mut W) -> io::Result<()>
where
    W: io::Write,
{
    for cmd in &registry.cmds {
        if let Some(v) = registry.aliases.get(&cmd.proto.ident) {
            writeln!(dest, "/// Fallbacks: {}", v.join(", "))?;
        }
        writeln!(dest,
            "#[allow(non_snake_case, unused_variables, dead_code)] #[inline]
            pub unsafe fn {name}({params}) -> {return_suffix} {{ \
                __gl_imports::mem::transmute::<_, extern \"system\" fn({typed_params}) -> {return_suffix}>\
                    (storage::{name}.f)({idents}) \
            }}",
            name = cmd.proto.ident,
            params = super::gen_parameters(cmd, true, true).join(", "),
            typed_params = super::gen_parameters(cmd, false, true).join(", "),
            return_suffix = cmd.proto.ty,
            idents = super::gen_parameters(cmd, true, false).join(", "),
        )?;
    }
    Ok(())
}
fn write_fns < W > ( registry : & Registry , dest : & mut W ) -> io :: Result < ( ) > where W : io :: Write , { for cmd in & registry . cmds { if let Some ( v ) = registry . aliases . get ( & cmd . proto . ident ) { writeln ! ( dest " " v join ( " " ) ) ? ; } writeln ! ( dest " \
 \" \" \
 \
 " name cmd proto ident params super gen_parameters ( cmd true true ) join ( " " ) typed_params super gen_parameters ( cmd false true ) join ( " " ) return_suffix cmd proto ty idents super gen_parameters ( cmd true false ) join ( " " ) ) ? ; } Ok ( ( ) ) }
Creates the functions corresponding to the GL commands.
Creates the functions corresponding to the GL commands .
registry
&Registry
dest
&mut W