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

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

vertex_shader

Source code of the vertex shader.

tessellation_control_shader

Source code of the optional tessellation control shader.

tessellation_evaluation_shader

Source code of the optional tessellation evaluation shader.

geometry_shader

Source code of the optional geometry shader.

fragment_shader

Source code of the fragment shader.

transform_feedback_varyings

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

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

Whether the shader uses point size.

Binary

Use a precompiled binary.

Fields

data

The data.

outputs_srgb

See SourceCode::outputs_srgb.

uses_point_size

Whether the shader uses point size.

Trait Implementations

impl<'a> From<SourceCode<'a>> for ProgramCreationInput<'a>

fn from(code: SourceCode<'a>) -> ProgramCreationInput<'a>

impl<'a> From<Binary> for ProgramCreationInput<'a>

fn from(binary: Binary) -> ProgramCreationInput<'a>