pub enum Platform {
Metal,
Hlsl,
Glsl,
}Expand description
Shader source language families supported by the engine. Each variant matches one render backend: Metal, HLSL (DirectX), or GLSL (Vulkan).
Variants§
Metal
Metal Shading Language, for the Metal backend.
Hlsl
HLSL, for the DirectX backend.
Glsl
GLSL, for the Vulkan backend.
Implementations§
Source§impl Platform
impl Platform
Sourcepub fn accepts_ext(self, ext: &str) -> bool
pub fn accepts_ext(self, ext: &str) -> bool
Whether a shader source with the given file extension is usable on this
platform. The matching extension (metal / hlsl / glsl) is accepted;
a non-matching shader extension is rejected so a single-path source
authored for one backend doesn’t get fed to another; an unknown
extension is accepted by default (the build step surfaces a real compile
error later if the file truly can’t be built).
Shared by the per-platform source selection of Shader stages and
SdfVolume so both apply identical fallback rules.
Trait Implementations§
impl Copy for Platform
impl Eq for Platform
impl StructuralPartialEq for Platform
Auto Trait Implementations§
impl Freeze for Platform
impl RefUnwindSafe for Platform
impl Send for Platform
impl Sync for Platform
impl Unpin for Platform
impl UnsafeUnpin for Platform
impl UnwindSafe for Platform
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
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§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.