pub trait ShaderResourceExtension: Sized {
// Required methods
fn from_str(str: &str, kind: ResourceKind) -> Result<Self, ShaderError>;
fn standard() -> Self;
fn standard_2d() -> Self;
fn standard_particle_system() -> Self;
fn standard_sprite() -> Self;
fn standard_terrain() -> Self;
fn standard_tile() -> Self;
fn standard_twosides() -> Self;
fn standard_shaders() -> [&'static BuiltInResource<Shader>; 7];
}
Expand description
Extension trait for shader resources.
Required Methods§
Sourcefn from_str(str: &str, kind: ResourceKind) -> Result<Self, ShaderError>
fn from_str(str: &str, kind: ResourceKind) -> Result<Self, ShaderError>
Creates new shader from given string. Input string must have the format defined in
examples for ShaderResource
.
Sourcefn standard_2d() -> Self
fn standard_2d() -> Self
Returns an instance of standard 2D shader.
Sourcefn standard_particle_system() -> Self
fn standard_particle_system() -> Self
Returns an instance of standard particle system shader.
Sourcefn standard_sprite() -> Self
fn standard_sprite() -> Self
Returns an instance of standard sprite shader.
Sourcefn standard_terrain() -> Self
fn standard_terrain() -> Self
Returns an instance of standard terrain shader.
Sourcefn standard_tile() -> Self
fn standard_tile() -> Self
Returns an instance of standard tile shader.
Sourcefn standard_twosides() -> Self
fn standard_twosides() -> Self
Returns an instance of standard two-sides terrain shader.
Sourcefn standard_shaders() -> [&'static BuiltInResource<Shader>; 7]
fn standard_shaders() -> [&'static BuiltInResource<Shader>; 7]
Returns a list of standard shader.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.