pub struct ShaderCompiler { /* private fields */ }Expand description
Shader compiler with caching and optimization
Implementations§
Source§impl ShaderCompiler
impl ShaderCompiler
Sourcepub fn compile_wgsl(&self, label: &str, source: &str) -> Result<ShaderModule>
pub fn compile_wgsl(&self, label: &str, source: &str) -> Result<ShaderModule>
Sourcepub fn compile_file(
&self,
label: &str,
path: impl AsRef<Path>,
) -> Result<ShaderModule>
pub fn compile_file( &self, label: &str, path: impl AsRef<Path>, ) -> Result<ShaderModule>
Sourcepub fn preprocessor(&self) -> &ShaderPreprocessor
pub fn preprocessor(&self) -> &ShaderPreprocessor
Get the preprocessor
Sourcepub fn preprocessor_mut(&mut self) -> &mut ShaderPreprocessor
pub fn preprocessor_mut(&mut self) -> &mut ShaderPreprocessor
Get a mutable reference to the preprocessor
Auto Trait Implementations§
impl !RefUnwindSafe for ShaderCompiler
impl !UnwindSafe for ShaderCompiler
impl Freeze for ShaderCompiler
impl Send for ShaderCompiler
impl Sync for ShaderCompiler
impl Unpin for ShaderCompiler
impl UnsafeUnpin for ShaderCompiler
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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more