pub struct ShaderPrograms {
pub name: String,
pub vertex: Option<String>,
pub fragment: String,
pub programs: Vec<CompiledProgram>,
}Expand description
The compiled payload a Shader carries in the blob: the authored files
and every program the cook compiled from them. Written by the cook, decoded
once by the renderer at load.
The sources ride along for the reason an SdfVolume’s field does: an
artifact is only loadable while the engine template it was built against
still matches, and the renderer proves that by reassembling and digesting.
Fields§
§name: StringThe Shader’s asset name, for diagnostics.
vertex: Option<String>The vertex file’s text, when the Shader declares one.
fragment: StringThe fragment file’s text.
programs: Vec<CompiledProgram>Compiled entries, in the order the cook emitted them.
Implementations§
Trait Implementations§
Source§impl Clone for ShaderPrograms
impl Clone for ShaderPrograms
Source§fn clone(&self) -> ShaderPrograms
fn clone(&self) -> ShaderPrograms
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ShaderPrograms
impl Debug for ShaderPrograms
Source§impl Default for ShaderPrograms
impl Default for ShaderPrograms
Source§fn default() -> ShaderPrograms
fn default() -> ShaderPrograms
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ShaderPrograms
impl<'de> Deserialize<'de> for ShaderPrograms
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ShaderPrograms
Source§impl PartialEq for ShaderPrograms
impl PartialEq for ShaderPrograms
Source§impl Serialize for ShaderPrograms
impl Serialize for ShaderPrograms
impl StructuralPartialEq for ShaderPrograms
Auto Trait Implementations§
impl Freeze for ShaderPrograms
impl RefUnwindSafe for ShaderPrograms
impl Send for ShaderPrograms
impl Sync for ShaderPrograms
impl Unpin for ShaderPrograms
impl UnsafeUnpin for ShaderPrograms
impl UnwindSafe for ShaderPrograms
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.