pub struct Program<B, Sem, Out, Uni>where
B: Shader,{ /* private fields */ }Expand description
A shader program.
Shader programs are GPU binaries that execute when a draw command is issued.
§Parametricity
Bis the backend type.Semis theSemanticstype.Outis the render target type.Uniis theUniformInterfacetype.
Implementations§
Source§impl<B, Sem, Out, Uni> Program<B, Sem, Out, Uni>
impl<B, Sem, Out, Uni> Program<B, Sem, Out, Uni>
Sourcepub fn adapt<Q>(
self,
) -> Result<BuiltProgram<B, Sem, Out, Q>, AdaptationFailure<B, Sem, Out, Uni>>where
Q: UniformInterface<B>,
pub fn adapt<Q>(
self,
) -> Result<BuiltProgram<B, Sem, Out, Q>, AdaptationFailure<B, Sem, Out, Uni>>where
Q: UniformInterface<B>,
Create a new UniformInterface but keep the Program around without rebuilding it.
§Parametricity
Qis the newUniformInterface.
Sourcepub fn adapt_env<Q, E>(
self,
env: &mut E,
) -> Result<BuiltProgram<B, Sem, Out, Q>, AdaptationFailure<B, Sem, Out, Uni>>where
Q: UniformInterface<B, E>,
pub fn adapt_env<Q, E>(
self,
env: &mut E,
) -> Result<BuiltProgram<B, Sem, Out, Q>, AdaptationFailure<B, Sem, Out, Uni>>where
Q: UniformInterface<B, E>,
Create a new UniformInterface but keep the Program around without rebuilding it, by
using a mutable environment variable.
§Parametricity
Qis the newUniformInterface.Eis the mutable environment variable.
Sourcepub fn readapt_env<E>(
self,
env: &mut E,
) -> Result<BuiltProgram<B, Sem, Out, Uni>, AdaptationFailure<B, Sem, Out, Uni>>where
Uni: UniformInterface<B, E>,
pub fn readapt_env<E>(
self,
env: &mut E,
) -> Result<BuiltProgram<B, Sem, Out, Uni>, AdaptationFailure<B, Sem, Out, Uni>>where
Uni: UniformInterface<B, E>,
Re-create the UniformInterface but keep the Program around without rebuilding it.
§Parametricity
Eis the mutable environment variable.
Auto Trait Implementations§
impl<B, Sem, Out, Uni> Freeze for Program<B, Sem, Out, Uni>
impl<B, Sem, Out, Uni> RefUnwindSafe for Program<B, Sem, Out, Uni>where
<B as Shader>::ProgramRepr: RefUnwindSafe,
Uni: RefUnwindSafe,
Sem: RefUnwindSafe,
Out: RefUnwindSafe,
impl<B, Sem, Out, Uni> !Send for Program<B, Sem, Out, Uni>
impl<B, Sem, Out, Uni> !Sync for Program<B, Sem, Out, Uni>
impl<B, Sem, Out, Uni> Unpin for Program<B, Sem, Out, Uni>
impl<B, Sem, Out, Uni> UnwindSafe for Program<B, Sem, Out, Uni>where
<B as Shader>::ProgramRepr: UnwindSafe,
Uni: UnwindSafe,
Sem: RefUnwindSafe,
Out: RefUnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more