[][src]Enum glium::program::ProgramCreationInput

pub enum ProgramCreationInput<'a> {
    SourceCode {
        vertex_shader: &'a str,
        tessellation_control_shader: Option<&'a str>,
        tessellation_evaluation_shader: Option<&'a str>,
        geometry_shader: Option<&'a str>,
        fragment_shader: &'a str,
        transform_feedback_varyings: Option<(Vec<String>, TransformFeedbackMode)>,
        outputs_srgb: bool,
        uses_point_size: bool,
    },
    Binary {
        data: Binary,
        outputs_srgb: bool,
        uses_point_size: bool,
    },
}

Input when creating a program.

Variants

SourceCode

Use GLSL source code.

Fields of SourceCode

vertex_shader: &'a str

Source code of the vertex shader.

tessellation_control_shader: Option<&'a str>

Source code of the optional tessellation control shader.

tessellation_evaluation_shader: Option<&'a str>

Source code of the optional tessellation evaluation shader.

geometry_shader: Option<&'a str>

Source code of the optional geometry shader.

fragment_shader: &'a str

Source code of the fragment shader.

transform_feedback_varyings: Option<(Vec<String>, TransformFeedbackMode)>

The list of variables and mode to use for transform feedback.

The information specified here will be passed to the OpenGL linker. If you pass None, then you won't be able to use transform feedback.

outputs_srgb: bool

Whether the fragment shader outputs colors in sRGB or RGB. This is false by default, meaning that the program outputs RGB.

If this is false, then GL_FRAMEBUFFER_SRGB will be enabled when this program is used (if it is supported).

uses_point_size: bool

Whether the shader uses point size.

Binary

Use a precompiled binary.

Fields of Binary

data: Binary

The data.

outputs_srgb: bool

See SourceCode::outputs_srgb.

uses_point_size: bool

Whether the shader uses point size.

Trait Implementations

impl<'a> From<Binary> for ProgramCreationInput<'a>[src]

impl<'a> From<SourceCode<'a>> for ProgramCreationInput<'a>[src]

Auto Trait Implementations

impl<'a> RefUnwindSafe for ProgramCreationInput<'a>

impl<'a> Send for ProgramCreationInput<'a>

impl<'a> Sync for ProgramCreationInput<'a>

impl<'a> Unpin for ProgramCreationInput<'a>

impl<'a> UnwindSafe for ProgramCreationInput<'a>

Blanket Implementations

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

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

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

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

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

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.