Struct bevy_retrograde::core::luminance::shader::ProgramBuilder [−]
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,
Sem: Semantics,
<C as GraphicsContext>::Backend: Shader,
impl<'a, C, Sem, Out, Uni> ProgramBuilder<'a, C, Sem, Out, Uni> where
C: GraphicsContext,
Sem: Semantics,
<C as GraphicsContext>::Backend: Shader,
pub fn new(ctx: &'a mut C) -> ProgramBuilder<'a, C, Sem, Out, Uni>
pub fn new(ctx: &'a mut C) -> ProgramBuilder<'a, C, Sem, Out, Uni>
Create a new ProgramBuilder
from a GraphicsContext
.
pub fn from_stages_env<'b, T, G, E>(
&mut self,
vertex: &'b Stage<<C as GraphicsContext>::Backend>,
tess: T,
geometry: G,
fragment: &'b Stage<<C as GraphicsContext>::Backend>,
env: &mut E
) -> Result<BuiltProgram<<C as GraphicsContext>::Backend, Sem, Out, Uni>, ProgramError> where
T: Into<Option<TessellationStages<'b, Stage<<C as GraphicsContext>::Backend>>>>,
G: Into<Option<&'b Stage<<C as GraphicsContext>::Backend>>>,
Uni: UniformInterface<<C as GraphicsContext>::Backend, E>,
pub fn from_stages_env<'b, T, G, E>(
&mut self,
vertex: &'b Stage<<C as GraphicsContext>::Backend>,
tess: T,
geometry: G,
fragment: &'b Stage<<C as GraphicsContext>::Backend>,
env: &mut E
) -> Result<BuiltProgram<<C as GraphicsContext>::Backend, Sem, Out, Uni>, ProgramError> where
T: Into<Option<TessellationStages<'b, Stage<<C as GraphicsContext>::Backend>>>>,
G: Into<Option<&'b Stage<<C as GraphicsContext>::Backend>>>,
Uni: UniformInterface<<C as GraphicsContext>::Backend, E>,
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 as GraphicsContext>::Backend>,
tess: T,
geometry: G,
fragment: &'b Stage<<C as GraphicsContext>::Backend>
) -> Result<BuiltProgram<<C as GraphicsContext>::Backend, Sem, Out, Uni>, ProgramError> where
T: Into<Option<TessellationStages<'b, Stage<<C as GraphicsContext>::Backend>>>>,
G: Into<Option<&'b Stage<<C as GraphicsContext>::Backend>>>,
Uni: UniformInterface<<C as GraphicsContext>::Backend, ()>,
pub fn from_stages<'b, T, G>(
&mut self,
vertex: &'b Stage<<C as GraphicsContext>::Backend>,
tess: T,
geometry: G,
fragment: &'b Stage<<C as GraphicsContext>::Backend>
) -> Result<BuiltProgram<<C as GraphicsContext>::Backend, Sem, Out, Uni>, ProgramError> where
T: Into<Option<TessellationStages<'b, Stage<<C as GraphicsContext>::Backend>>>>,
G: Into<Option<&'b Stage<<C as GraphicsContext>::Backend>>>,
Uni: UniformInterface<<C as GraphicsContext>::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 as GraphicsContext>::Backend, Sem, Out, Uni>, ProgramError> where
T: Into<Option<TessellationStages<'b, str>>>,
G: Into<Option<&'b str>>,
Uni: UniformInterface<<C as GraphicsContext>::Backend, E>,
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 as GraphicsContext>::Backend, Sem, Out, Uni>, ProgramError> where
T: Into<Option<TessellationStages<'b, str>>>,
G: Into<Option<&'b str>>,
Uni: UniformInterface<<C as GraphicsContext>::Backend, E>,
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 as GraphicsContext>::Backend, Sem, Out, Uni>, ProgramError> where
T: Into<Option<TessellationStages<'b, str>>>,
G: Into<Option<&'b str>>,
Uni: UniformInterface<<C as GraphicsContext>::Backend, ()>,
pub fn from_strings<'b, T, G>(
&mut self,
vertex: &'b str,
tess: T,
geometry: G,
fragment: &'b str
) -> Result<BuiltProgram<<C as GraphicsContext>::Backend, Sem, Out, Uni>, ProgramError> where
T: Into<Option<TessellationStages<'b, str>>>,
G: Into<Option<&'b str>>,
Uni: UniformInterface<<C as GraphicsContext>::Backend, ()>,
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.
Auto Trait Implementations
impl<'a, C, Sem, Out, Uni> RefUnwindSafe for ProgramBuilder<'a, C, Sem, Out, Uni> where
C: RefUnwindSafe,
Out: RefUnwindSafe,
Sem: RefUnwindSafe,
Uni: RefUnwindSafe,
impl<'a, C, Sem, Out, Uni> Send for ProgramBuilder<'a, C, Sem, Out, Uni> where
C: Send,
Out: Send,
Sem: Send,
Uni: Send,
impl<'a, C, Sem, Out, Uni> Sync for ProgramBuilder<'a, C, Sem, Out, Uni> where
C: Sync,
Out: Sync,
Sem: Sync,
Uni: Sync,
impl<'a, C, Sem, Out, Uni> Unpin for ProgramBuilder<'a, C, Sem, Out, Uni> where
Out: Unpin,
Sem: Unpin,
Uni: Unpin,
impl<'a, C, Sem, Out, Uni> !UnwindSafe for ProgramBuilder<'a, C, Sem, Out, Uni>
Blanket Implementations
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
pub fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
pub fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
pub fn vzip(self) -> V