Struct rin::gl::autoload::ProgramSettings[][src]

pub struct ProgramSettings<P> where
    P: AsRef<Path> + Clone
{ pub version: usize, pub precision: ShaderPrecision, pub extensions: Vec<String, Global>, pub defines: Vec<(String, String), Global>, pub shaders: Vec<(u32, P), Global>, pub shader_replace: Vec<(u32, (String, String)), Global>, pub includes_search_paths: Vec<P, Global>, pub includes_dictionary: IndexMap<String, String, RandomState>, }

Program settings to be used by a glsl program autoloader

Fields

version: usize

glsl version, in desktop 330, 400, 420… in gles 2 or 3

precision: ShaderPrecision

precision of the shaders, by now applied to vertex and fragment

extensions: Vec<String, Global>

enabled extensions by name

defines: Vec<(String, String), Global>

add or change defines in the shaders

shaders: Vec<(u32, P), Global>

shader type / path pairs

shader_replace: Vec<(u32, (String, String)), Global>

shader type / replacement pairs where replacement is two strings one for search and the second for replace by every time the shader is realoaded any replacements will be applied

includes_search_paths: Vec<P, Global>

search paths for includes. includes will be looked for in the same folder as the shader and if not found there in each of the paths in this vector until found

includes_dictionary: IndexMap<String, String, RandomState>

includes substitutions that don’t come from files in the file system the key of this hashmap is the name of the include as found in the shaders the value is the source for the include

Implementations

impl<P> ProgramSettings<P> where
    P: AsRef<Path> + Clone
[src]

pub fn to_glin(&self) -> Result<Settings<String>, Error>[src]

Converts this settings into glin::program::Settings by loading the shaders from the specified paths and turning them into a source String

Trait Implementations

impl<P> Clone for ProgramSettings<P> where
    P: Clone + AsRef<Path>, 
[src]

impl<P> Debug for ProgramSettings<P> where
    P: Debug + AsRef<Path> + Clone
[src]

Auto Trait Implementations

impl<P> RefUnwindSafe for ProgramSettings<P> where
    P: RefUnwindSafe

impl<P> Send for ProgramSettings<P> where
    P: Send

impl<P> Sync for ProgramSettings<P> where
    P: Sync

impl<P> Unpin for ProgramSettings<P> where
    P: Unpin

impl<P> UnwindSafe for ProgramSettings<P> where
    P: UnwindSafe

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Any for T where
    T: Any
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Downcast for T where
    T: Any
[src]

impl<T> DowncastSync for T where
    T: Any + Send + Sync
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<V> IntoPnt<V> for V[src]

impl<V> IntoVec<V> for V[src]

impl<T> Pointable for T[src]

type Init = T

The type for initializers.

impl<T> Same<T> for T[src]

type Output = T

Should always be Self

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<SS, SP> SupersetOf<SS> for SP where
    SS: SubsetOf<SP>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]