Struct luminance::shader::ProgramBuilder [−][src]
pub struct ProgramBuilder<'a, C, Sem, Out, Uni> { /* fields omitted */ }
Expand description
A Program
builder.
This type allows to create shader programs without having to worry too much about the highly generic API.
Implementations
impl<'a, C, Sem, Out, Uni> ProgramBuilder<'a, C, Sem, Out, Uni> where
C: GraphicsContext,
C::Backend: Shader,
Sem: Semantics,
impl<'a, C, Sem, Out, Uni> ProgramBuilder<'a, C, Sem, Out, Uni> where
C: GraphicsContext,
C::Backend: Shader,
Sem: Semantics,
Create a new ProgramBuilder
from a GraphicsContext
.
pub fn from_stages_env<'b, T, G, E>(
&mut self,
vertex: &'b Stage<C::Backend>,
tess: T,
geometry: G,
fragment: &'b Stage<C::Backend>,
env: &mut E
) -> Result<BuiltProgram<C::Backend, Sem, Out, Uni>, ProgramError> where
Uni: UniformInterface<C::Backend, E>,
T: Into<Option<TessellationStages<'b, Stage<C::Backend>>>>,
G: Into<Option<&'b Stage<C::Backend>>>,
pub fn from_stages_env<'b, T, G, E>(
&mut self,
vertex: &'b Stage<C::Backend>,
tess: T,
geometry: G,
fragment: &'b Stage<C::Backend>,
env: &mut E
) -> Result<BuiltProgram<C::Backend, Sem, Out, Uni>, ProgramError> where
Uni: UniformInterface<C::Backend, E>,
T: Into<Option<TessellationStages<'b, Stage<C::Backend>>>>,
G: Into<Option<&'b Stage<C::Backend>>>,
Create a Program
by linking Stage
s and accessing a mutable environment variable.
Parametricity
T
is anOption
containing aTessellationStages
withStage
inside.G
is anOption
containing aStage
inside (geometry shader).E
is the mutable environment variable.
Notes
Feel free to look at the documentation of GraphicsContext::new_shader_program
for
a simpler interface.
pub fn from_stages<'b, T, G>(
&mut self,
vertex: &'b Stage<C::Backend>,
tess: T,
geometry: G,
fragment: &'b Stage<C::Backend>
) -> Result<BuiltProgram<C::Backend, Sem, Out, Uni>, ProgramError> where
Uni: UniformInterface<C::Backend>,
T: Into<Option<TessellationStages<'b, Stage<C::Backend>>>>,
G: Into<Option<&'b Stage<C::Backend>>>,
pub fn from_stages<'b, T, G>(
&mut self,
vertex: &'b Stage<C::Backend>,
tess: T,
geometry: G,
fragment: &'b Stage<C::Backend>
) -> Result<BuiltProgram<C::Backend, Sem, Out, Uni>, ProgramError> where
Uni: UniformInterface<C::Backend>,
T: Into<Option<TessellationStages<'b, Stage<C::Backend>>>>,
G: Into<Option<&'b Stage<C::Backend>>>,
Create a Program
by linking Stage
s.
Parametricity
T
is anOption
containing aTessellationStages
withStage
inside.G
is anOption
containing aStage
inside (geometry shader).
Notes
Feel free to look at the documentation of GraphicsContext::new_shader_program
for
a simpler interface.
pub fn from_strings_env<'b, T, G, E>(
&mut self,
vertex: &'b str,
tess: T,
geometry: G,
fragment: &'b str,
env: &mut E
) -> Result<BuiltProgram<C::Backend, Sem, Out, Uni>, ProgramError> where
Uni: UniformInterface<C::Backend, E>,
T: Into<Option<TessellationStages<'b, str>>>,
G: Into<Option<&'b str>>,
pub fn from_strings_env<'b, T, G, E>(
&mut self,
vertex: &'b str,
tess: T,
geometry: G,
fragment: &'b str,
env: &mut E
) -> Result<BuiltProgram<C::Backend, Sem, Out, Uni>, ProgramError> where
Uni: UniformInterface<C::Backend, E>,
T: Into<Option<TessellationStages<'b, str>>>,
G: Into<Option<&'b str>>,
Create a Program
by linking &str
s and accessing a mutable environment variable.
Parametricity
C
is the graphics context.T
is anOption
containing aTessellationStages
with&str
inside.G
is anOption
containing aStage
inside (geometry shader).E
is the mutable environment variable.
Notes
Feel free to look at the documentation of GraphicsContext::new_shader_program
for
a simpler interface.
pub fn from_strings<'b, T, G>(
&mut self,
vertex: &'b str,
tess: T,
geometry: G,
fragment: &'b str
) -> Result<BuiltProgram<C::Backend, Sem, Out, Uni>, ProgramError> where
Uni: UniformInterface<C::Backend>,
T: Into<Option<TessellationStages<'b, str>>>,
G: Into<Option<&'b str>>,
pub fn from_strings<'b, T, G>(
&mut self,
vertex: &'b str,
tess: T,
geometry: G,
fragment: &'b str
) -> Result<BuiltProgram<C::Backend, Sem, Out, Uni>, ProgramError> where
Uni: UniformInterface<C::Backend>,
T: Into<Option<TessellationStages<'b, str>>>,
G: Into<Option<&'b str>>,
Create a Program
by linking &str
s.
Parametricity
C
is the graphics context.T
is anOption
containing aTessellationStages
with&str
inside.G
is anOption
containing aStage
inside (geometry shader).
Notes
Feel free to look at the documentation of GraphicsContext::new_shader_program
for
a simpler interface.