pub fn from_stages_env<'a, E, T, G>(
    tess: T,
    vertex: &Stage,
    geometry: G,
    fragment: &Stage,
    env: E,
  ) -> Result<BuiltProgram<S, Out, Uni>, ProgramError>
  where Uni: UniformInterface<E>,
        T: Into<Option<(&'a Stage, &'a Stage)>>,
        G: Into<Option<&'a Stage>> {
    let raw = RawProgram::new(tess, vertex, geometry, fragment)?;

    let mut warnings = bind_vertex_attribs_locations::<S>(&raw);

    raw.link()?;

    let (uni_iface, uniform_warnings) = create_uniform_interface(&raw, env)?;
    warnings.extend(uniform_warnings.into_iter().map(ProgramWarning::Uniform));

    let program = Program {
      raw,
      uni_iface,
      _in: PhantomData,
      _out: PhantomData,
    };

    Ok(BuiltProgram { program, warnings })
  }
/// Create a new program by consuming `Stage`s and by looking up an environment.
Create a new program by consuming `Stage`s and by looking up an environment.
Create a new program by consuming ` Stage ` s and by looking up an environment .
pub fn from_stages_env<'a, E, T, G>(
    tess: T,
    vertex: &Stage,
    geometry: G,
    fragment: &Stage,
    env: E,
  ) -> Result<BuiltProgram<S, Out, Uni>, ProgramError>
  where Uni: UniformInterface<E>,
        T: Into<Option<(&'a Stage, &'a Stage)>>,
        G: Into<Option<&'a Stage>> {
    let raw = RawProgram::new(tess, vertex, geometry, fragment)?;
    let mut warnings = bind_vertex_attribs_locations::<S>(&raw);
    raw.link()?;
    let (uni_iface, uniform_warnings) = create_uniform_interface(&raw, env)?;
    warnings.extend(uniform_warnings.into_iter().map(ProgramWarning::Uniform));
    let program = Program {
      raw,
      uni_iface,
      _in: PhantomData,
      _out: PhantomData,
    };
    Ok(BuiltProgram { program, warnings })
  }
pub fn from_stages_env < ' a , E , T , G > ( tess : T , vertex : & Stage , geometry : G , fragment : & Stage , env : E , ) -> Result < BuiltProgram < S , Out , Uni > , ProgramError > where Uni : UniformInterface < E > , T : Into < Option < ( & ' a Stage , & ' a Stage ) > > , G : Into < Option < & ' a Stage > > { let raw = RawProgram :: new ( tess , vertex , geometry , fragment ) ? ; let mut warnings = bind_vertex_attribs_locations :: < S > ( & raw ) ; raw . link ( ) ? ; let ( uni_iface , uniform_warnings ) = create_uniform_interface ( & raw , env ) ? ; warnings . extend ( uniform_warnings . into_iter ( ) . map ( ProgramWarning :: Uniform ) ) ; let program = Program { raw , uni_iface , _in : PhantomData , _out : PhantomData , } ; Ok ( BuiltProgram { program , warnings } ) }
Create a new program by consuming `Stage`s and by looking up an environment.
Create a new program by consuming ` Stage ` s and by looking up an environment .
tess
T
vertex
&Stage
geometry
G
fragment
&Stage
env
E