pub struct Shader(/* private fields */);Expand description
Handle to a WGSL shader. Derefs to Node.
Implementations§
Source§impl Shader
impl Shader
Sourcepub fn source(wgsl: impl Into<String>) -> ShaderBuilder
pub fn source(wgsl: impl Into<String>) -> ShaderBuilder
A shader from WGSL text. The text defines struct Params, the
uniform p, and fn shade. oxframe adds ox and ShadeIn.
The waves preset is what gets painted. A custom shade is
type-checked on every draw.
Sourcepub fn file(path: impl AsRef<Path>) -> ShaderBuilder
pub fn file(path: impl AsRef<Path>) -> ShaderBuilder
A shader read from path on every draw, so saving the file updates
the running scene without a rebuild.
Trait Implementations§
impl Copy for Shader
impl Eq for Shader
impl StructuralPartialEq for Shader
Auto Trait Implementations§
impl Freeze for Shader
impl RefUnwindSafe for Shader
impl Send for Shader
impl Sync for Shader
impl Unpin for Shader
impl UnsafeUnpin for Shader
impl UnwindSafe for Shader
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.